org.rosuda.JRI
Class RVector

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by org.rosuda.JRI.RVector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class RVector
extends java.util.Vector

class encapsulating named generic vectors in R - do NOT use add/remove directly as names are not synchronized with the contents. The reason for this implementation is for historical compatibility and it may change in the future.

It is now used in REXP where Vector type was used previously for contents storage.

Since:
JRI 0.3
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
RVector()
           
 
Method Summary
 REXP at(int i)
           
 REXP at(java.lang.String name)
          return contents by name or null if not found
 java.util.Vector getNames()
          return the vector containg all names
 void setNames(java.lang.String[] nam)
          replace the names vector - do NOT use directly!
 
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

RVector

public RVector()
Method Detail

setNames

public void setNames(java.lang.String[] nam)
replace the names vector - do NOT use directly!

Parameters:
nam - list of names

getNames

public java.util.Vector getNames()
return the vector containg all names

Returns:
vector containing all names

at

public REXP at(java.lang.String name)
return contents by name or null if not found

Parameters:
name - key (name)
Returns:
contents or null if not found

at

public REXP at(int i)