Package org.javimmutable.collections
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
-
Method Summary
Modifier and TypeMethodDescriptionAdd value to the container in some manner appropriate to the implementation.Add all values to the container in some manner appropriate to the implementation.Add all values to the container in some manner appropriate to the implementation.default boolean
isEmpty()
default boolean
int
size()
Methods inherited from interface org.javimmutable.collections.IStreamable
getSpliteratorCharacteristics, iterator, parallelStream, spliterator, stream
Methods inherited from interface org.javimmutable.collections.SplitableIterable
forEachThrows, indexedForEach, indexedForEachThrows, reduce, reduceThrows
-
Method Details
-
insert
Add value to the container in some manner appropriate to the implementation. -
insertAll
Add all values to the container in some manner appropriate to the implementation. -
insertAll
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
- Returns:
- an equivalent collection with no values
-