Class ListCollisionSet<T>
java.lang.Object
org.javimmutable.collections.list.ListCollisionSet<T>
- All Implemented Interfaces:
CollisionSet<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.javimmutable.collections.common.CollisionSet
CollisionSet.Node
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(CollisionSet.Node node, T value) delete
(CollisionSet.Node node, T value) empty()
first
(CollisionSet.Node node) void
forEach
(CollisionSet.Node node, Proc1<T> proc) <E extends Exception>
voidforEachThrows
(CollisionSet.Node node, Proc1Throws<T, E> proc) insert
(CollisionSet.Node node, T value) static <T> ListCollisionSet
<T> instance()
iterateOverRange
(CollisionSet.Node node, GenericIterator.State<T> parent, int offset, int limit) <R> R
reduce
(CollisionSet.Node node, R sum, Sum1<T, R> proc) <R,
E extends Exception>
RreduceThrows
(CollisionSet.Node node, R sum, Sum1Throws<T, R, E> proc) int
size
(CollisionSet.Node node) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.javimmutable.collections.common.CollisionSet
genericIterable, iterable, iterator
-
Method Details
-
instance
-
empty
- Specified by:
empty
in interfaceCollisionSet<T>
-
single
- Specified by:
single
in interfaceCollisionSet<T>
-
dual
- Specified by:
dual
in interfaceCollisionSet<T>
-
size
- Specified by:
size
in interfaceCollisionSet<T>
-
contains
- Specified by:
contains
in interfaceCollisionSet<T>
-
insert
- Specified by:
insert
in interfaceCollisionSet<T>
-
delete
- Specified by:
delete
in interfaceCollisionSet<T>
-
first
- Specified by:
first
in interfaceCollisionSet<T>
-
iterateOverRange
@Nullable public GenericIterator.State<T> iterateOverRange(@Nonnull CollisionSet.Node node, @Nullable GenericIterator.State<T> parent, int offset, int limit) - Specified by:
iterateOverRange
in interfaceCollisionSet<T>
-
forEach
- Specified by:
forEach
in interfaceCollisionSet<T>
-
forEachThrows
public <E extends Exception> void forEachThrows(@Nonnull CollisionSet.Node node, @Nonnull Proc1Throws<T, E> proc) throws E- Specified by:
forEachThrows
in interfaceCollisionSet<T>
- Throws:
E
-
reduce
- Specified by:
reduce
in interfaceCollisionSet<T>
-
reduceThrows
public <R,E extends Exception> R reduceThrows(@Nonnull CollisionSet.Node node, R sum, @Nonnull Sum1Throws<T, R, throws EE> proc) - Specified by:
reduceThrows
in interfaceCollisionSet<T>
- Throws:
E
-