de.matthiasmann.twl.utils
Class SizeSequence

java.lang.Object
  extended by de.matthiasmann.twl.utils.SizeSequence
Direct Known Subclasses:
TableBase.ColumnSizeSequence

public class SizeSequence
extends java.lang.Object


Field Summary
protected  int defaultValue
           
protected  int size
           
protected  int[] table
           
 
Constructor Summary
SizeSequence()
           
SizeSequence(int initialCapacity)
           
 
Method Summary
protected  void adjustSize(int index, int delta)
           
protected  int fromSizes(int low, int high)
           
 int getEndPosition()
           
 int getIndex(int position)
           
 int getPosition(int index)
           
 int getSize(int index)
           
 void initializeAll(int count)
           
protected  void initializeSizes(int index, int count)
           
 void insert(int index, int count)
           
 void remove(int index, int count)
           
 void setDefaultValue(int defaultValue)
           
 boolean setSize(int index, int size)
           
 int size()
           
protected  int toSizes(int low, int high, int[] dst)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected int[] table

size

protected int size

defaultValue

protected int defaultValue
Constructor Detail

SizeSequence

public SizeSequence()

SizeSequence

public SizeSequence(int initialCapacity)
Method Detail

size

public int size()

getPosition

public int getPosition(int index)

getEndPosition

public int getEndPosition()

getIndex

public int getIndex(int position)

getSize

public int getSize(int index)

setSize

public boolean setSize(int index,
                       int size)

adjustSize

protected void adjustSize(int index,
                          int delta)

toSizes

protected int toSizes(int low,
                      int high,
                      int[] dst)

fromSizes

protected int fromSizes(int low,
                        int high)

insert

public void insert(int index,
                   int count)

remove

public void remove(int index,
                   int count)

initializeAll

public void initializeAll(int count)

setDefaultValue

public void setDefaultValue(int defaultValue)

initializeSizes

protected void initializeSizes(int index,
                               int count)