org.apache.activemq.store.kahadb.disk.util
Class Sequence

java.lang.Object
  extended by org.apache.activemq.store.kahadb.disk.util.LinkedNode<Sequence>
      extended by org.apache.activemq.store.kahadb.disk.util.Sequence

public class Sequence
extends LinkedNode<Sequence>

Represents a range of numbers.

Author:
chirino

Nested Class Summary
static interface Sequence.Closure<T extends Throwable>
           
 
Field Summary
 
Fields inherited from class org.apache.activemq.store.kahadb.disk.util.LinkedNode
list, next, prev
 
Constructor Summary
Sequence(long value)
           
Sequence(long first, long last)
           
 
Method Summary
 boolean contains(long value)
           
<T extends Throwable>
void
each(Sequence.Closure<T> closure)
           
 long getFirst()
           
 long getLast()
           
 boolean isAdjacentToFirst(long value)
           
 boolean isAdjacentToLast(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sequence

public Sequence(long value)

Sequence

public Sequence(long first,
                long last)
Method Detail

isAdjacentToLast

public boolean isAdjacentToLast(long value)

isAdjacentToFirst

public boolean isAdjacentToFirst(long value)

contains

public boolean contains(long value)

range

public long range()

toString

public String toString()
Overrides:
toString in class Object

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


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.