| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectgov.llnl.lc.chaos.Genderspublic class Gendersextends java.lang.ObjectConstructor Summary | |
| |
| |
Method Summary | |
void |
|
String[] |
|
String[] |
|
String[] |
|
String |
|
String |
|
int |
|
String |
|
String[] |
|
String[] |
|
String[] |
|
int |
|
int |
|
boolean |
|
boolean |
|
boolean |
|
String[] |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
public Genders()
throws GendersExceptionCreates a Genders object, loading the default genders database
public Genders(String filename)
throws GendersExceptionCreates a Genders object, loading the specified genders database
public void cleanup()
Cleans up allocated memory. Must be called to free memory from underlying calls. After this method is called, all genders methods above cannot be called and will result in errors.
public String[] getattr()
throws GendersExceptionReturns all the attributes of the node you are running on
- Throws:
GendersException- on error
public String[] getattr(String node)
throws GendersExceptionReturns all the attributes of the specified node
- Throws:
GendersException- on error
public String[] getattr_all()
throws GendersExceptionReturns all of the attributes in the genders database
- Throws:
GendersException- on error
public String getattrval(String attr)
throws GendersExceptionReturns the value of the specified attribute on the current node you are running on
- Throws:
GendersException- on error
public String getattrval(String node,
String attr)
throws GendersExceptionReturns the value of the specified attribute on the specified node. May be an empty string if the attribute contains no value.
- Throws:
GendersException- on error
public int getmaxattrs()
throws GendersExceptionReturns maximum number of attributes of any one node parsed in the genders database
- Throws:
GendersException- on error
public String getnodename()
throws GendersExceptionReturns the current node you are on, in shortened hostname format.
- Throws:
GendersException- on error
public String[] getnodes()
throws GendersExceptionReturns all the nodes in the genders database
- Throws:
GendersException- on error
public String[] getnodes(String attr)
throws GendersExceptionReturns all the nodes with the specified attribute
- Throws:
GendersException- on error
public String[] getnodes(String attr,
String val)
throws GendersExceptionReturns all the nodes with the specified attribute and value
- Throws:
GendersException- on error
public int getnumattrs()
throws GendersExceptionReturns number of attributes parsed in the genders database
- Throws:
GendersException- on error
public int getnumnodes()
throws GendersExceptionReturns number of nodes parsed in the genders database
- Throws:
GendersException- on error
public boolean isattr(String attr)
throws GendersExceptionTests if the specified attribute exists in the genders database
- Throws:
GendersException- on error
public boolean isattrval(String attr,
String val)
throws GendersExceptionTests if the specified value exists in the genders database
- Throws:
GendersException- on error
public boolean isnode(String node)
throws GendersExceptionTests if the specified node exists in the genders database
- Throws:
GendersException- on error
public String[] query(String query)
throws GendersExceptionReturns nodes specified via the specified query. Signify union with '||', intersection with '&&', * difference with '--', and complement with '~'. Operations are performed left to right. Parentheses can be used to change the order of operations.
- Throws:
GendersException- on error
public boolean testattr(String attr)
throws GendersExceptionTests if the current node has the specified attribute
- Throws:
GendersException- on error
public boolean testattr(String node,
String attr)
throws GendersExceptionTests if the specified node has the specified attribute
- Throws:
GendersException- on error
public boolean testattrval(String attr,
String val)
throws GendersExceptionTests if the current node has the specified attribute and value.
- Throws:
GendersException- on error
public boolean testattrval(String node,
String attr,
String val)
throws GendersExceptionTests if the specified node has the specified attribute and value.
- Throws:
GendersException- on error
public boolean testquery(String query)
throws GendersExceptionTest if the current node meets the conditions of the specified query.
- Throws:
GendersException- on error
public boolean testquery(String node,
String query)
throws GendersExceptionTest if the specified node meets the conditions of the specified query.
- Throws:
GendersException- on error