Package org.organicdesign.fp.collections
Class UnmodList.AbstractUnmodList<E>
- java.lang.Object
-
- org.organicdesign.fp.collections.AbstractUnmodIterable<E>
-
- org.organicdesign.fp.collections.UnmodList.AbstractUnmodList<E>
-
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,List<E>
,Sized
,UnmodCollection<E>
,UnmodIterable<E>
,UnmodList<E>
,UnmodSortedCollection<E>
,UnmodSortedIterable<E>
,Transformable<E>
- Direct Known Subclasses:
PersistentVector
,PersistentVector.MutVector
public abstract static class UnmodList.AbstractUnmodList<E> extends AbstractUnmodIterable<E> implements UnmodList<E>
Implements equals and hashCode() methods compatible with java.util.List (which ignores order) to make defining unmod lists easier.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.UnmodIterable
UnmodIterable.UnIterable
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.UnmodList
UnmodList.AbstractUnmodList<E>
-
-
Constructor Summary
Constructors Constructor Description AbstractUnmodList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
int
hashCode()
This implementation is compatible with java.util.AbstractList but O(n).-
Methods inherited from class org.organicdesign.fp.collections.AbstractUnmodIterable
toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
get, size, spliterator
-
Methods inherited from interface org.organicdesign.fp.xform.Transformable
any, toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutList, toMutMap, toMutRrbt, toMutSet, toMutSortedMap, toMutSortedSet
-
Methods inherited from interface org.organicdesign.fp.collections.UnmodIterable
concat, drop, dropWhile, filter, flatMap, fold, foldUntil, head, map, precat, take, takeWhile, whereNonNull
-
Methods inherited from interface org.organicdesign.fp.collections.UnmodList
add, add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, sort, subList, toArray, toArray
-
-
-
-
Method Detail
-
equals
public boolean equals(Object other)
-
hashCode
public int hashCode()
This implementation is compatible with java.util.AbstractList but O(n).- Specified by:
hashCode
in interfaceCollection<E>
- Specified by:
hashCode
in interfaceList<E>
- Overrides:
hashCode
in classAbstractUnmodIterable<E>
-
-