Class Sequence
- java.lang.Object
-
- org.apache.activemq.store.kahadb.disk.util.LinkedNode<Sequence>
-
- org.apache.activemq.store.kahadb.disk.util.Sequence
-
public class Sequence extends LinkedNode<Sequence>
Represents a range of numbers.- Author:
- chirino
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSequence.Closure<T extends Throwable>
-
Field Summary
-
Fields inherited from class org.apache.activemq.store.kahadb.disk.util.LinkedNode
list, next, prev
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(long value)<T extends Throwable>
voideach(Sequence.Closure<T> closure)longgetFirst()longgetLast()booleanisAdjacentToFirst(long value)booleanisAdjacentToLast(long value)booleanisBiggerButNotAdjacentToLast(long value)longrange()voidsetFirst(long first)voidsetLast(long last)StringtoString()-
Methods inherited from class org.apache.activemq.store.kahadb.disk.util.LinkedNode
getHeadNode, getList, getNext, getNextCircular, getPrevious, getPreviousCircular, getTailNode, isHeadNode, isLinked, isTailNode, linkAfter, linkAfter, linkBefore, linkBefore, linkToHead, linkToTail, splitAfter, splitBefore, unlink
-
-
-
-
Method Detail
-
isAdjacentToLast
public boolean isAdjacentToLast(long value)
-
isBiggerButNotAdjacentToLast
public boolean isBiggerButNotAdjacentToLast(long value)
-
isAdjacentToFirst
public boolean isAdjacentToFirst(long value)
-
contains
public boolean contains(long value)
-
range
public long range()
-
getFirst
public long getFirst()
-
setFirst
public void setFirst(long first)
-
getLast
public long getLast()
-
setLast
public void setLast(long last)
-
each
public <T extends Throwable> void each(Sequence.Closure<T> closure) throws T extends Throwable
- Throws:
T extends Throwable
-
-