public REXPList _attr() { return resolve()._attr(); }
public REXPList _attr() { return resolve()._attr(); }
/** 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; }
public REXPFactory(REXP r) throws REXPMismatchException { if (r == null) r=new REXPNull(); REXPList a = r._attr(); cont = r; if (a != null) attr = new REXPFactory(a);
public REXPFactory(REXP r) throws REXPMismatchException { if (r == null) r=new REXPNull(); REXPList a = r._attr(); cont = r; if (a != null) attr = new REXPFactory(a);