visidia.rule
Class RuleVector

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by visidia.rule.RuleVector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class RuleVector
extends java.util.Vector

Randomized methods.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
RuleVector()
           
RuleVector(java.util.Collection c)
           
RuleVector(int i)
           
 
Method Summary
 RuleVector cloneRules()
          clones the vector, all elements should be vectors. no verification is done.
 int contains(Rule r)
          looks in the vector for an elements Rule equals to the parameter r, this operation is Randomized.
 int count()
           
 int indexOf(Neighbor nei)
          looks in the vector for an elements Neighbor equals to the parameter nei, this operation is Randomized.
 int indexOfLabel(Neighbor nei)
          looks in the vector for an elements having the same label as the parameter nei. this operation is Randomized.
 java.util.Iterator randIterator()
           
 
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

RuleVector

public RuleVector()

RuleVector

public RuleVector(int i)

RuleVector

public RuleVector(java.util.Collection c)
Method Detail

count

public int count()

indexOf

public int indexOf(Neighbor nei)
looks in the vector for an elements Neighbor equals to the parameter nei, this operation is Randomized.

Parameters:
nei -
Returns:
the index of nei in the vector if exists, else -1

indexOfLabel

public int indexOfLabel(Neighbor nei)
looks in the vector for an elements having the same label as the parameter nei. this operation is Randomized.

Parameters:
nei -
Returns:
the index of nei in the vector if exists, else -1

cloneRules

public RuleVector cloneRules()
clones the vector, all elements should be vectors. no verification is done.


contains

public int contains(Rule r)
looks in the vector for an elements Rule equals to the parameter r, this operation is Randomized.

Parameters:
r -
Returns:
the rule index; or -1 if the vector does not contain the rule

randIterator

public java.util.Iterator randIterator()
Returns:
a randomIterator for the elements of the vector.