org.erights.e.meta.java.util
Class VectorSugar

java.lang.Object
  |
  +--org.erights.e.meta.java.util.VectorSugar

public class VectorSugar
extends Object

Untamed:


Constructor Summary
private VectorSugar()
          prevent instantiation
 
Method Summary
static void __printOn(Vector self, TextWriter out)
          Enabled: Btw, in java1.1, Vector.toString() blows up on null elements
static Object get(Vector self, int index)
          Enabled: If the index is in bounds, return the corresponding element.
static void iterate(Vector self, AssocFunc func)
          Enabled: Considered as a map, a Vector is a map from indices to values, so iterate() will call func with each successive pair of index and value, in ascending index order.
static void put(Vector self, int index, Object newValue)
          Enabled:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorSugar

private VectorSugar()
prevent instantiation

Method Detail

get

public static Object get(Vector self,
                         int index)
                  throws IndexOutOfBoundsException
Enabled: If the index is in bounds, return the corresponding element. Otherwise throw an IndexOutOfBoundsException

IndexOutOfBoundsException

iterate

public static void iterate(Vector self,
                           AssocFunc func)
Enabled: Considered as a map, a Vector is a map from indices to values, so iterate() will call func with each successive pair of index and value, in ascending index order. It does this over a snapshot of the Vector, so that changes to the Vector during enumeration don't effect the enumeration.


put

public static void put(Vector self,
                       int index,
                       Object newValue)
Enabled:


__printOn

public static void __printOn(Vector self,
                             TextWriter out)
                      throws IOException
Enabled: Btw, in java1.1, Vector.toString() blows up on null elements

IOException


comments?