You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** 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.
<p>
It is now used in <code>REXP</code> where <code>Vector</code> type was used previously for contents storage.
@since JRI 0.3
*/
publicclassRVectorextendsjava.util.Vector {
Vectornames = null;
publicRVector() { super(); }
/** replace the names vector - do NOT use directly!
@param nam list of names */
publicvoidsetNames(String[] nam) {
names=newVector(nam.length);
inti=0;
while (i<nam.length)
names.addElement(nam[i++]);
}
/** return the vector containg all names
@return vector containing all names */
publicVectorgetNames() {
returnnames;
}
/** return contents by name or <code>null</code> if not found
@param name key (name)
@return contents or <code>null</code> if not found
*/
publicREXPat(Stringname) {
if (names==null) returnnull;
inti=0;
for (Enumeratione = names.elements() ; e.hasMoreElements() ;) {