com.ibm.wala.util.collections
Class SimpleVector<T>

java.lang.Object
  extended by com.ibm.wala.util.collections.SimpleVector<T>
All Implemented Interfaces:
IVector<T>, java.lang.Iterable<T>

public class SimpleVector<T>
extends java.lang.Object
implements IVector<T>

simple implementation of IVector


Constructor Summary
SimpleVector()
           
 
Method Summary
 T get(int x)
           
 int getMaxIndex()
           
 java.util.Iterator<T> iterator()
           
 void performVerboseAction()
           
 void set(int x, T value)
          TODO: this can be optimized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleVector

public SimpleVector()
Method Detail

get

public T get(int x)
Specified by:
get in interface IVector<T>

set

public void set(int x,
                T value)
Description copied from interface: IVector
TODO: this can be optimized

Specified by:
set in interface IVector<T>
See Also:
IntVector.set(int, int)

performVerboseAction

public void performVerboseAction()
Specified by:
performVerboseAction in interface IVector<T>

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>

getMaxIndex

public int getMaxIndex()
Specified by:
getMaxIndex in interface IVector<T>
Returns:
max i s.t get(i) != null