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 interface
Sequence.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 boolean
contains(long value)
<T extends Throwable>
voideach(Sequence.Closure<T> closure)
long
getFirst()
long
getLast()
boolean
isAdjacentToFirst(long value)
boolean
isAdjacentToLast(long value)
boolean
isBiggerButNotAdjacentToLast(long value)
long
range()
void
setFirst(long first)
void
setLast(long last)
String
toString()
-
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
-
-