Constructor and Description |
---|
Model(Arg... args)
Create a model with a sequence of args.
|
Model(Model m,
Arg... args)
Create a model with a sequence of args, building it on top of an existing
If you need the same arg more than once, pass the same argument multiple
times
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
dump()
Dump the model
|
java.lang.String |
dump(java.lang.String attribute)
Dump an attribute
|
boolean |
exists(java.lang.String name)
Check if a value exits
|
boolean |
exists(java.lang.String name,
int pos)
Check if the nth value (1-based) exists
|
java.util.Date |
getDate(java.lang.String name)
Return the value as a date
|
java.util.Date |
getDate(java.lang.String name,
int n)
Return the nth value as a date
|
java.lang.Integer |
getInt(java.lang.String name)
Return the value as a int
|
java.lang.Integer |
getInt(java.lang.String name,
int n)
Return the nth value as a int
|
java.lang.Long |
getLong(java.lang.String name)
Return the value as a long
|
java.lang.Long |
getLong(java.lang.String name,
int n)
Return the nth value as a long
|
java.lang.Iterable<java.lang.Integer> |
getRange(java.lang.String attribute)
Return the range of the attribute: an iterator returning the valid values
for(int i: m.getRange("attr")) { doSometing(m.getString("attr", i)); }
|
int |
getSize(java.lang.String attribute)
Return the size of the attribute
|
java.lang.String |
getString(java.lang.String name)
Return the value as a string
|
java.lang.String |
getString(java.lang.String name,
int n)
Return the nth value as a string
|
public Model(Arg... args)
args
- public boolean exists(java.lang.String name)
public boolean exists(java.lang.String name, int pos)
public java.lang.String getString(java.lang.String name)
public java.lang.String getString(java.lang.String name, int n)
public java.lang.Integer getInt(java.lang.String name)
public java.lang.Integer getInt(java.lang.String name, int n)
public java.lang.Long getLong(java.lang.String name)
public java.lang.Long getLong(java.lang.String name, int n)
public java.util.Date getDate(java.lang.String name)
public java.util.Date getDate(java.lang.String name, int n)
public int getSize(java.lang.String attribute)
public java.lang.Iterable<java.lang.Integer> getRange(java.lang.String attribute)