/** returns all keys of the list * @return array containing all keys or <code>null</code> if list unnamed */ public String[] keys() { if (names==null) return null; int i = 0; String k[] = new String[names.size()]; while (i < k.length) { k[i] = keyAt(i); i++; }; return k; }
/** returns all keys of the list * @return array containing all keys or <code>null</code> if list unnamed */ public String[] keys() { if (names==null) return null; int i = 0; String k[] = new String[names.size()]; while (i < k.length) { k[i] = keyAt(i); i++; }; return k; }
public String toDebugString() { StringBuffer sb = new StringBuffer(super.toDebugString()+"{"); int i = 0; while (i < payload.size() && i < maxDebugItems) { if (i>0) sb.append(",\n"); String name = payload.keyAt(i); if (name!=null) sb.append(name+"="); sb.append(payload.at(i).toDebugString()); i++; } if (i < payload.size()) sb.append(",.."); return sb.toString()+"}"; } }
public String toDebugString() { StringBuffer sb = new StringBuffer(super.toDebugString()+"{"); int i = 0; while (i < payload.size() && i < maxDebugItems) { if (i>0) sb.append(",\n"); String name = payload.keyAt(i); if (name!=null) sb.append(name+"="); sb.append(payload.at(i).toDebugString()); i++; } if (i < payload.size()) sb.append(",.."); return sb.toString()+"}"; } }
public void putAll(Map t) { if (t==null) return; // NOTE: this if branch is dead since RList cannot inherit from Map if (t instanceof RList) { // we need some more sophistication for RLists as they may have null-names which we append RList l = (RList) t; if (names==null) { addAll(l); return; } int n = l.size(); int i = 0; while (i < n) { String key = l.keyAt(i); if (key==null) add(l.at(i)); else put(key, l.at(i)); i++; } } else { Set ks = t.keySet(); Iterator i = ks.iterator(); while (i.hasNext()) { Object key = i.next(); put(key, t.get(key)); } } }
public void putAll(Map t) { if (t==null) return; // NOTE: this if branch is dead since RList cannot inherit from Map if (t instanceof RList) { // we need some more sophistication for RLists as they may have null-names which we append RList l = (RList) t; if (names==null) { addAll(l); return; } int n = l.size(); int i = 0; while (i < n) { String key = l.keyAt(i); if (key==null) add(l.at(i)); else put(key, l.at(i)); i++; } } else { Set ks = t.keySet(); Iterator i = ks.iterator(); while (i.hasNext()) { Object key = i.next(); put(key, t.get(key)); } } }
public void putAll(RList t) { if (t == null) return; RList l = (RList) t; if (names==null) { addAll(l); return; } int n = l.size(); int i = 0; while (i < n) { String key = l.keyAt(i); if (key == null) add(l.at(i)); else put(key, l.at(i)); i++; } }
public void putAll(RList t) { if (t == null) return; RList l = (RList) t; if (names==null) { addAll(l); return; } int n = l.size(); int i = 0; while (i < n) { String key = l.keyAt(i); if (key == null) add(l.at(i)); else put(key, l.at(i)); i++; } }
if (rxt==XT_LIST_TAG) { int pl=l; String s = lst.keyAt(i); l+=4; // header for a symbol l+=(s==null)?1:(s.length()+1);
if (rxt==XT_LIST_TAG) { int pl=l; String s = lst.keyAt(i); l+=4; // header for a symbol l+=(s==null)?1:(s.length()+1);
io = new REXPFactory(x).getBinaryRepresentation(buf, io); if (rxt == XT_LIST_TAG || rxt == XT_LANG_TAG) io = new REXPFactory(new REXPSymbol(lst.keyAt(i))).getBinaryRepresentation(buf, io); i++;
io = new REXPFactory(x).getBinaryRepresentation(buf, io); if (rxt == XT_LIST_TAG || rxt == XT_LANG_TAG) io = new REXPFactory(new REXPSymbol(lst.keyAt(i))).getBinaryRepresentation(buf, io); i++;