Package org.reactfx.util
Class SparseList.PresentSegment<E>
- java.lang.Object
-
- org.reactfx.util.SparseList.PresentSegment<E>
-
- All Implemented Interfaces:
SparseList.Segment<E>
- Enclosing class:
- SparseList<E>
private static final class SparseList.PresentSegment<E> extends java.lang.Object implements SparseList.Segment<E>
-
-
Constructor Summary
Constructors Constructor Description PresentSegment(java.util.Collection<? extends E> c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<E>appendRangeTo(java.util.List<E> acc, int from, int to)java.util.List<E>appendTo(java.util.List<E> acc)java.util.Optional<E>get(int index)intgetLength()EgetOrThrow(int index)intgetPresentCount()intgetPresentCountBetween(int from, int to)booleanisPresent()booleanisPresent(int index)booleanpossiblyDestructiveAppend(SparseList.Segment<E> suffix)voidsetOrThrow(int index, E elem)SparseList.Segment<E>subSegment(int from, int to)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.reactfx.util.SparseList.Segment
getStatsBetween
-
-
-
-
Field Detail
-
list
private final java.util.List<E> list
-
-
Constructor Detail
-
PresentSegment
public PresentSegment(java.util.Collection<? extends E> c)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isPresent
public boolean isPresent()
- Specified by:
isPresentin interfaceSparseList.Segment<E>
-
getLength
public int getLength()
- Specified by:
getLengthin interfaceSparseList.Segment<E>
-
getPresentCount
public int getPresentCount()
- Specified by:
getPresentCountin interfaceSparseList.Segment<E>
-
getPresentCountBetween
public int getPresentCountBetween(int from, int to)- Specified by:
getPresentCountBetweenin interfaceSparseList.Segment<E>
-
isPresent
public boolean isPresent(int index)
- Specified by:
isPresentin interfaceSparseList.Segment<E>
-
get
public java.util.Optional<E> get(int index)
- Specified by:
getin interfaceSparseList.Segment<E>
-
getOrThrow
public E getOrThrow(int index)
- Specified by:
getOrThrowin interfaceSparseList.Segment<E>
-
setOrThrow
public void setOrThrow(int index, E elem)- Specified by:
setOrThrowin interfaceSparseList.Segment<E>
-
appendTo
public java.util.List<E> appendTo(java.util.List<E> acc)
- Specified by:
appendToin interfaceSparseList.Segment<E>
-
appendRangeTo
public java.util.List<E> appendRangeTo(java.util.List<E> acc, int from, int to)
- Specified by:
appendRangeToin interfaceSparseList.Segment<E>
-
subSegment
public SparseList.Segment<E> subSegment(int from, int to)
- Specified by:
subSegmentin interfaceSparseList.Segment<E>
-
possiblyDestructiveAppend
public boolean possiblyDestructiveAppend(SparseList.Segment<E> suffix)
- Specified by:
possiblyDestructiveAppendin interfaceSparseList.Segment<E>
-
-