Package org.reactfx.util
Class SparseList.AbsentSegment<E>
- java.lang.Object
-
- org.reactfx.util.SparseList.AbsentSegment<E>
-
- All Implemented Interfaces:
SparseList.Segment<E>
- Enclosing class:
- SparseList<E>
private static final class SparseList.AbsentSegment<E> extends java.lang.Object implements SparseList.Segment<E>
-
-
Field Summary
Fields Modifier and Type Field Description private int
length
-
Constructor Summary
Constructors Constructor Description AbsentSegment(int length)
-
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)
int
getLength()
E
getOrThrow(int index)
int
getPresentCount()
int
getPresentCountBetween(int from, int to)
boolean
isPresent()
boolean
isPresent(int index)
boolean
possiblyDestructiveAppend(SparseList.Segment<E> suffix)
void
setOrThrow(int index, E elem)
SparseList.Segment<E>
subSegment(int from, int to)
java.lang.String
toString()
-
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
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isPresent
public boolean isPresent()
- Specified by:
isPresent
in interfaceSparseList.Segment<E>
-
getLength
public int getLength()
- Specified by:
getLength
in interfaceSparseList.Segment<E>
-
getPresentCount
public int getPresentCount()
- Specified by:
getPresentCount
in interfaceSparseList.Segment<E>
-
getPresentCountBetween
public int getPresentCountBetween(int from, int to)
- Specified by:
getPresentCountBetween
in interfaceSparseList.Segment<E>
-
isPresent
public boolean isPresent(int index)
- Specified by:
isPresent
in interfaceSparseList.Segment<E>
-
get
public java.util.Optional<E> get(int index)
- Specified by:
get
in interfaceSparseList.Segment<E>
-
getOrThrow
public E getOrThrow(int index)
- Specified by:
getOrThrow
in interfaceSparseList.Segment<E>
-
setOrThrow
public void setOrThrow(int index, E elem)
- Specified by:
setOrThrow
in interfaceSparseList.Segment<E>
-
appendTo
public java.util.List<E> appendTo(java.util.List<E> acc)
- Specified by:
appendTo
in interfaceSparseList.Segment<E>
-
appendRangeTo
public java.util.List<E> appendRangeTo(java.util.List<E> acc, int from, int to)
- Specified by:
appendRangeTo
in interfaceSparseList.Segment<E>
-
subSegment
public SparseList.Segment<E> subSegment(int from, int to)
- Specified by:
subSegment
in interfaceSparseList.Segment<E>
-
possiblyDestructiveAppend
public boolean possiblyDestructiveAppend(SparseList.Segment<E> suffix)
- Specified by:
possiblyDestructiveAppend
in interfaceSparseList.Segment<E>
-
-