public String toString() { return super.toString()+(asList().isNamed()?"named":""); }
public String toString() { return super.toString()+(asList().isNamed()?"named":""); }
/** retrieve an attribute of the given name from this object * @param name attribute name * @return attribute value or <code>null</code> if the attribute does not exist */ public REXP getAttribute(String name) { final REXPList a = _attr(); if (a==null || !a.isList()) return null; return a.asList().at(name); }
/** retrieve an attribute of the given name from this object * @param name attribute name * @return attribute value or <code>null</code> if the attribute does not exist */ public REXP getAttribute(String name) { final REXPList a = _attr(); if (a==null || !a.isList()) return null; return a.asList().at(name); }
/** checks whether this obejct has a given attribute * @param name attribute name * @return <code>true</code> if the attribute exists, <code>false</code> otherwise */ public boolean hasAttribute(String name) { final REXPList a = _attr(); return (a!=null && a.isList() && a.asList().at(name)!=null); }
/** checks whether this obejct has a given attribute * @param name attribute name * @return <code>true</code> if the attribute exists, <code>false</code> otherwise */ public boolean hasAttribute(String name) { final REXPList a = _attr(); return (a!=null && a.isList() && a.asList().at(name)!=null); }
/** returns dimensions of the object (as determined by the "<code>dim</code>" attribute) * @return an array of integers with corresponding dimensions or <code>null</code> if the object has no dimension attribute */ public int[] dim() { try { return hasAttribute("dim")?_attr().asList().at("dim").asIntegers():null; } catch (REXPMismatchException me) { } return null; }
/** returns dimensions of the object (as determined by the "<code>dim</code>" attribute) * @return an array of integers with corresponding dimensions or <code>null</code> if the object has no dimension attribute */ public int[] dim() { try { return hasAttribute("dim")?_attr().asList().at("dim").asIntegers():null; } catch (REXPMismatchException me) { } return null; }
REXPList a = getAttr(); RList al = null; if (a!=null) al = a.asList(); if (al != null && al.size()>0) hasAttr=true; if (hasAttr)
REXPList a = getAttr(); RList al = null; if (a!=null) al = a.asList(); if (al != null && al.size()>0) hasAttr=true; if (hasAttr)
REXP ca = getAttr().asList().at("class"); REXP ls = getAttr().asList().at("levels"); if (ca != null && ls != null && ca.asString().equals("factor")) { if (getAttr()!=null && getAttr().asList().at("names") != null) { REXP nam = getAttr().asList().at("names"); String names[] = null; if (nam.isString()) names = nam.asStrings();
REXP ca = getAttr().asList().at("class"); REXP ls = getAttr().asList().at("levels"); if (ca != null && ls != null && ca.asString().equals("factor")) { if (getAttr()!=null && getAttr().asList().at("names") != null) { REXP nam = getAttr().asList().at("names"); String names[] = null; if (nam.isString()) names = nam.asStrings();
final REXPList a = getAttr(); RList al = null; if (a != null) al = a.asList(); if (al != null && al.size()>0) hasAttr=true; int rxt=type, ooff=off;
final REXPList a = getAttr(); RList al = null; if (a != null) al = a.asList(); if (al != null && al.size()>0) hasAttr=true; int rxt=type, ooff=off;