@Immutable public final class FixedUncheckedSimpleCollection<E> extends Object implements SimpleCollection<E>
SimpleCollection
implementation for an immutable
collection from a trusted source. It provides an iteration order and permits nulls.
This is immutable assuming the ownership of the backing array is exclusive. Hence the need to be created by a trusted source.
Constructor and Description |
---|
FixedUncheckedSimpleCollection(Object[] array) |
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty() |
Iterator<E> |
iterator()
Returns an iterator over the elements in this collection.
|
int |
size()
Returns an estimate of the number of elements in the collection.
|
Iterator<E> |
structuralIterator()
An iterator over the structure of the collection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
stream
forEach, spliterator
public FixedUncheckedSimpleCollection(Object[] array)
public int size()
SimpleCollection
size
in interface SimpleCollection<E>
public boolean isEmpty()
isEmpty
in interface SimpleCollection<E>
true
if there are no childrenpublic Iterator<E> structuralIterator()
SimpleCollection
structuralIterator
in interface SimpleCollection<E>
public Iterator<E> iterator()
SimpleCollection
Copyright © 2014–2016. All rights reserved.