public abstract static class IntCollections.EmptyCollection extends AbstractIntCollection
This class may be useful to implement your own in case you subclass a type-specific collection.
| Modifier | Constructor and Description |
|---|---|
protected |
EmptyCollection() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(java.util.Collection<? extends java.lang.Integer> c) |
boolean |
addAll(IntCollection c)
Adds all elements of the given type-specific collection to this collection.
|
void |
clear() |
boolean |
contains(int k)
Returns
true if this collection contains the specified element. |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
containsAll(IntCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
equals(java.lang.Object o) |
void |
forEach(java.util.function.Consumer<? super java.lang.Integer> action)
Deprecated.
|
void |
forEach(java.util.function.IntConsumer action)
Performs the given action for each element of this type-specific
Iterable
until all elements have been processed or the action throws an
exception. |
int |
hashCode() |
IntBidirectionalIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(IntCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeIf(java.util.function.IntPredicate filter)
Remove from this collection all elements which satisfy the given predicate.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Integer> filter)
Deprecated.
|
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(IntCollection c)
Retains in this collection only elements from the given type-specific collection.
|
int |
size() |
it.unimi.dsi.fastutil.ints.IntSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this collection.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
int[] |
toIntArray()
Returns a primitive type array containing the items of this collection.
|
int[] |
toIntArray(int[] a)
Deprecated.
|
add, add, contains, forEach, rem, remove, removeIf, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitintIterator, intParallelStream, intSpliterator, intStream, parallelStream, streampublic boolean contains(int k)
AbstractIntCollectiontrue if this collection contains the specified element.contains in interface IntCollectioncontains in class AbstractIntCollectionCollection.contains(Object)public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Integer>toArray in class java.util.AbstractCollection<java.lang.Integer>public <T> T[] toArray(T[] array)
toArray in interface java.util.Collection<java.lang.Integer>toArray in class java.util.AbstractCollection<java.lang.Integer>public IntBidirectionalIterator iterator()
IntCollectioniterator in interface IntCollectioniterator in interface IntIterableiterator in interface java.lang.Iterable<java.lang.Integer>iterator in interface java.util.Collection<java.lang.Integer>iterator in class AbstractIntCollectionIterable.iterator()public it.unimi.dsi.fastutil.ints.IntSpliterator spliterator()
IntCollectionSee Collection.spliterator() for more documentation on the requirements
of the returned spliterator.
public int size()
size in interface java.util.Collection<java.lang.Integer>size in class java.util.AbstractCollection<java.lang.Integer>public void clear()
clear in interface java.util.Collection<java.lang.Integer>clear in class java.util.AbstractCollection<java.lang.Integer>public int hashCode()
hashCode in interface java.util.Collection<java.lang.Integer>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Integer>equals in class java.lang.Object@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Integer> action)
IntIterablepublic boolean containsAll(java.util.Collection<?> c)
AbstractIntCollectioncontainsAll in interface java.util.Collection<java.lang.Integer>containsAll in class AbstractIntCollectionpublic boolean addAll(java.util.Collection<? extends java.lang.Integer> c)
AbstractIntCollectionaddAll in interface java.util.Collection<java.lang.Integer>addAll in class AbstractIntCollectionpublic boolean removeAll(java.util.Collection<?> c)
AbstractIntCollectionremoveAll in interface java.util.Collection<java.lang.Integer>removeAll in class AbstractIntCollectionpublic boolean retainAll(java.util.Collection<?> c)
AbstractIntCollectionretainAll in interface java.util.Collection<java.lang.Integer>retainAll in class AbstractIntCollection@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Integer> filter)
IntCollectionpublic int[] toIntArray()
IntCollectiontoIntArray in interface IntCollectiontoIntArray in class AbstractIntCollectionCollection.toArray()@Deprecated public int[] toIntArray(int[] a)
AbstractIntCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toIntArray in interface IntCollectiontoIntArray in class AbstractIntCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public void forEach(java.util.function.IntConsumer action)
IntIterableIterable
until all elements have been processed or the action throws an
exception.action - the action to be performed for each element.Iterable.forEach(java.util.function.Consumer)public boolean containsAll(IntCollection c)
IntCollectioncontainsAll in interface IntCollectioncontainsAll in class AbstractIntCollectionc - a type-specific collection.true if this collection contains all elements of the argument.Collection.containsAll(Collection)public boolean addAll(IntCollection c)
IntCollectionaddAll in interface IntCollectionaddAll in class AbstractIntCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean removeAll(IntCollection c)
IntCollectionremoveAll in interface IntCollectionremoveAll in class AbstractIntCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(IntCollection c)
IntCollectionretainAll in interface IntCollectionretainAll in class AbstractIntCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public boolean removeIf(java.util.function.IntPredicate filter)
IntCollectionfilter - a predicate which returns true for elements to be
removed.true if any elements were removed.Collection.removeIf(java.util.function.Predicate)