Class Collections

java.lang.Object
edu.tufts.hrilab.action.operators.Collections

public final class Collections extends Object
  • Constructor Details

    • Collections

      public Collections()
  • Method Details

    • clear

      public static void clear(Collection collection)
      Collection operators
    • isEmpty

      public static boolean isEmpty(Collection collection)
    • size

      public static int size(Collection collection)
    • newArrayList

      public static <T> List<T> newArrayList(Class<T> cls)
      List operators
    • add

      public static <T> boolean add(List<T> list, T element)
    • add

      public static <T> void add(List<T> list, int index, T element)
    • addAll

      public static <T> boolean addAll(List<T> list, List<T> elements)
    • contains

      public static boolean contains(List list, Object o)
    • get

      public static <T> T get(List<T> list, int index)
    • remove

      public static <T> T remove(List<T> list, int index)
    • remove

      public static <T> boolean remove(List<T> list, T element)
    • set

      public static <T> T set(List<T> list, int index, T element)
    • subList

      public static <T> List<T> subList(List<T> list, int start, int end)
    • newHashSet

      public static <T> Set<T> newHashSet(Class<T> cls)
      Set operators
    • add

      public static <T> boolean add(Set<T> set, T element)
    • contains

      public static boolean contains(Set set, Object o)
    • remove

      public static <T> boolean remove(Set<T> set, T element)
    • newHashMap

      public static <K, V> Map<K,V> newHashMap(Class<K> key, Class<V> value)
      Map operators
    • containsKey

      public static boolean containsKey(Map map, Object key)
    • containsValue

      public static boolean containsValue(Map map, Object value)
    • entrySet

      public static <K, V> Set<Map.Entry<K,V>> entrySet(Map<K,V> map)
    • get

      public static <K, V> V get(Map<K,V> map, K key)
    • keySet

      public static <K> Set<K> keySet(Map<K,?> map)
    • put

      public static <K, V> V put(Map<K,V> map, K key, V value)
    • remove

      public static <K, V> V remove(Map<K,V> map, K key)