public class ConfigHashtable extends Object implements Serializable
Note that if one of the "at" methods is invoked, but no value has
been specified for the configuration parameter, a HydraConfigException is thrown.
TestConfig.tab(),
Serialized Form| Constructor and Description |
|---|
ConfigHashtable() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanAt(Long key)
Returns the string at key as a boolean.
|
boolean |
booleanAt(Long key,
boolean defaultVal) |
boolean |
booleanAtWild(Long key,
int i,
Boolean defaultVal)
Return the ith boolean of a vector parameter.
|
static boolean |
booleanFor(Object val,
GsRandom rand,
Long key) |
double |
doubleAt(Long key)
Returns the double value of the Double at key.
|
double |
doubleAt(Long key,
double defaultVal) |
double |
doubleAtWild(Long key,
int i,
double defaultVal)
Return the ith double of a vector parameter.
|
static double |
doubleFor(Object val,
GsRandom rand,
Long key) |
Object |
get(Long key)
Return the parameter with the given key or null if there isn't one.
|
Object |
get(Long key,
int i,
Object defaultVal)
Return the ith element of a vector parameter,
or the default if it's not there.
|
Object |
get(Long key,
Object defaultVal)
Return the parameter with the given key or the default if there isn't one.
|
Boolean |
getBoolean(Long key,
Object val)
Returns a Boolean from the object, null if it is the default string.
|
Double |
getDouble(Long key,
Object val)
Returns a Double from the object, null if it is the default string.
|
Integer |
getInteger(Long key,
Object val)
Returns an Integer from the object, null if it is the default string.
|
Long |
getLong(Long key,
Object val)
Returns a Long from the object, null if it is the default string.
|
protected String |
getPath(Long key,
Object val)
Returns a path from the object, null if it is the default string.
|
GsRandom |
getRandGen()
Returns the random number generator associated with this instance of
ConfigHashtable.
|
String |
getString(Long key,
Object val)
Returns a String from the object, null if it is the default string.
|
Vector |
getVector(Long key,
Object val)
Returns a Vector from the object, null if it is the default string.
|
Object |
getWild(Long key,
int i,
Object defaultVal)
Return the ith element of a hydra vector parameter.
|
static Object |
getWild(Vector v,
int i,
Object defaultVal) |
int |
intAt(Long key)
Returns the int value of key.
|
int |
intAt(Long key,
int defaultVal) |
int |
intAtWild(Long key,
int i,
int defaultVal)
Return the ith int of a vector parameter.
|
static int |
intFor(Object val,
GsRandom rand,
Long key) |
long |
longAt(Long key)
Returns the long value of the Double at key.
|
long |
longAt(Long key,
long defaultVal) |
long |
longAtWild(Long key,
int i,
long defaultVal)
Return the ith long of a vector parameter.
|
static long |
longFor(Object val,
GsRandom rand,
Long key) |
String |
pathAt(Long key)
Returns the path stored at key.
|
String |
pathAt(Long key,
int i,
String defaultVal)
Return the ith element of a vector parameter as a path,
or default if null.
|
String |
pathAt(Long key,
String defaultVal) |
String |
pathAtWild(Long key,
int i,
String defaultVal)
Return the ith path of a vector parameter.
|
static String |
pathFor(Object val,
GsRandom rand,
Long key) |
void |
put(Long key,
Object val)
Put an object in the table if it isn't null.
|
int |
size() |
String |
stringAt(Long key)
Returns the String stored at key.
|
String |
stringAt(Long key,
int i,
String defaultVal)
Return the ith element of a vector parameter as a String,
or default if null.
|
String |
stringAt(Long key,
String defaultVal) |
String |
stringAtWild(Long key,
int i,
String defaultVal)
Return the ith string of a vector parameter.
|
static String |
stringFor(Object val,
GsRandom rand,
Long key) |
SortedMap |
toSortedMap() |
protected SortedMap |
toSortedMap(boolean forLatestConf) |
String |
toString() |
HydraVector |
vecAt(Long key)
Returns the HydraVector stored at key.
|
HydraVector |
vecAt(Long key,
HydraVector defaultVal) |
HydraVector |
vecAt(Long key,
int i,
HydraVector defaultVal)
Return the ith element of a vector of vectors parameter as a HydraVector,
or default if null.
|
HydraVector |
vecAtWild(Long key,
int i,
HydraVector defaultVal)
Return the ith vector of a vector of vectors parameter.
|
static HydraVector |
vecFor(Object val) |
public int size()
public int intAt(Long key)
public int intAt(Long key, int defaultVal)
public int intAtWild(Long key, int i, int defaultVal)
public long longAt(Long key)
public long longAt(Long key, long defaultVal)
public long longAtWild(Long key, int i, long defaultVal)
public double doubleAt(Long key)
public double doubleAt(Long key, double defaultVal)
public double doubleAtWild(Long key, int i, double defaultVal)
public boolean booleanAt(Long key)
public boolean booleanAt(Long key, boolean defaultVal)
public boolean booleanAtWild(Long key, int i, Boolean defaultVal)
public String stringAt(Long key, int i, String defaultVal)
public String stringAtWild(Long key, int i, String defaultVal)
public String pathAt(Long key, int i, String defaultVal)
public String pathAtWild(Long key, int i, String defaultVal)
public HydraVector vecAt(Long key)
public HydraVector vecAt(Long key, HydraVector defaultVal)
public HydraVector vecAt(Long key, int i, HydraVector defaultVal)
public HydraVector vecAtWild(Long key, int i, HydraVector defaultVal)
public static HydraVector vecFor(Object val)
public Object get(Long key, Object defaultVal)
public Object get(Long key, int i, Object defaultVal)
public Object getWild(Long key, int i, Object defaultVal)
public Boolean getBoolean(Long key, Object val)
HydraTypeException - if the object is an illegal type.public Double getDouble(Long key, Object val)
HydraTypeException - if the object is an illegal type.public Integer getInteger(Long key, Object val)
HydraTypeException - if the object is an illegal type.public Long getLong(Long key, Object val)
HydraTypeException - if the object is an illegal type.public String getString(Long key, Object val)
HydraTypeException - if the object is an illegal type.public Vector getVector(Long key, Object val)
HydraTypeException - if the object is an illegal type.protected String getPath(Long key, Object val)
HydraTypeException - if the object is an illegal type.public GsRandom getRandGen()
Prms.randomSeed if it exists.
Otherwise the seed is System.currentTimeMillis().public SortedMap toSortedMap()
protected SortedMap toSortedMap(boolean forLatestConf)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.