Interface ICollection<T>

All Superinterfaces:
IStreamable<T>, Iterable<T>, Serializable, SplitableIterable<T>
All Known Subinterfaces:
IArray<T>, IDeque<T>, IList<T>, IListMap<K,V>, IMap<K,V>, IMultiset<T>, ISet<T>, ISetMap<K,V>
All Known Implementing Classes:
AbstractMap, AbstractMultiset, AbstractSet, AbstractSetUsingMap, ArrayDeque, EmptyHashMap, EmptyHashSet, HashListMap, HashMap, HashMultiset, HashSet, HashSetMap, OrderedListMap, OrderedMap, OrderedMultiset, OrderedSet, OrderedSetMap, TemplateSetMap, TreeList, TreeListMap, TreeMap, TreeMultiset, TreeSet, TreeSetMap, TrieArray

public interface ICollection<T> extends IStreamable<T>, Serializable
  • Method Details

    • insert

      @Nonnull ICollection<T> insert(T value)
      Add value to the container in some manner appropriate to the implementation.
    • insertAll

      @Nonnull ICollection<T> insertAll(@Nonnull Iterator<? extends T> iterator)
      Add all values to the container in some manner appropriate to the implementation.
    • insertAll

      @Nonnull ICollection<T> insertAll(@Nonnull Iterable<? extends T> iterable)
      Add all values to the container in some manner appropriate to the implementation.
    • size

      int size()
      Returns:
      number of values in the collection
    • isEmpty

      default boolean isEmpty()
      Returns:
      true only if collection contains no values
    • isNonEmpty

      default boolean isNonEmpty()
      Returns:
      false only if collection contains no values
    • deleteAll

      @Nonnull ICollection<T> deleteAll()
      Returns:
      an equivalent collection with no values