concast.merged
Class TimerList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--concast.merged.TimerList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class TimerList
extends java.util.Vector

Internal class, list of timers.
record : (tag, absolute time)
Items are sorted by time in ascending order

See Also:
Serialized Form

Inner Class Summary
 class TimerList.TimeTag
          List element
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
TimerList()
           
 
Method Summary
 boolean cancelTimer(long tag)
          Remove record for given tag
 TimerList.TimeTag getFirstTimeTag()
          Return first record
 long getTimer(long tag)
          Returns absolute value of timer for given tag
 java.lang.String print()
           
 void removeFirst()
           
 boolean setTimer(long time, long tag)
          Insert item to the list, sorted by time, it doesn't check is tag is already in the list Merged is written such a way, that it's impossible
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

TimerList

public TimerList()
Method Detail

setTimer

public boolean setTimer(long time,
                        long tag)
Insert item to the list, sorted by time, it doesn't check is tag is already in the list Merged is written such a way, that it's impossible

getTimer

public long getTimer(long tag)
Returns absolute value of timer for given tag

cancelTimer

public boolean cancelTimer(long tag)
Remove record for given tag

getFirstTimeTag

public TimerList.TimeTag getFirstTimeTag()
Return first record

removeFirst

public void removeFirst()

print

public java.lang.String print()