Package org.nd4j.common.tools
Class PropertyParser
- java.lang.Object
-
- org.nd4j.common.tools.PropertyParser
-
public class PropertyParser extends Object
PropertyParser- Author:
- gagatust
-
-
Constructor Summary
Constructors Constructor Description PropertyParser(Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertiesgetProperties()booleanparseBoolean(String name)Parse property.charparseChar(String name)Parse property.doubleparseDouble(String name)Parse property.floatparseFloat(String name)Parse property.intparseInt(String name)Parse property.longparseLong(String name)Parse property.StringparseString(String name)Parse property.voidsetProperties(Properties properties)booleantoBoolean(String name)Get property.booleantoBoolean(String name, boolean defaultValue)Get property.chartoChar(String name)Get property.chartoChar(String name, char defaultValue)Get property.doubletoDouble(String name)Get property.doubletoDouble(String name, double defaultValue)Get property.floattoFloat(String name)Get property.floattoFloat(String name, float defaultValue)Get property.inttoInt(String name)Get property.inttoInt(String name, int defaultValue)Get property.longtoLong(String name)Get property.longtoLong(String name, long defaultValue)Get property.StringtoString(String name)Get property.StringtoString(String name, String defaultValue)Get property.
-
-
-
Constructor Detail
-
PropertyParser
public PropertyParser(Properties properties)
-
-
Method Detail
-
getProperties
public Properties getProperties()
-
setProperties
public void setProperties(Properties properties)
-
parseString
public String parseString(String name)
Parse property.- Parameters:
name- property name- Returns:
- property
-
parseInt
public int parseInt(String name)
Parse property.- Parameters:
name- property name- Returns:
- property
-
parseBoolean
public boolean parseBoolean(String name)
Parse property.- Parameters:
name- property name- Returns:
- property
-
parseFloat
public float parseFloat(String name)
Parse property.- Parameters:
name- property name- Returns:
- property
-
parseDouble
public double parseDouble(String name)
Parse property.- Parameters:
name- property name- Returns:
- property
-
parseLong
public long parseLong(String name)
Parse property.- Parameters:
name- property name- Returns:
- property
-
parseChar
public char parseChar(String name)
Parse property.- Parameters:
name- property name- Returns:
- property
-
toString
public String toString(String name)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property name- Returns:
- property
-
toInt
public int toInt(String name)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property name- Returns:
- property
-
toBoolean
public boolean toBoolean(String name)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property name- Returns:
- property
-
toFloat
public float toFloat(String name)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property name- Returns:
- property
-
toDouble
public double toDouble(String name)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property name- Returns:
- property
-
toLong
public long toLong(String name)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property name- Returns:
- property
-
toChar
public char toChar(String name)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property name- Returns:
- property
-
toString
public String toString(String name, String defaultValue)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property namedefaultValue- default value- Returns:
- property
-
toInt
public int toInt(String name, int defaultValue)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property namedefaultValue- default value- Returns:
- property
-
toBoolean
public boolean toBoolean(String name, boolean defaultValue)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property namedefaultValue- default value- Returns:
- property
-
toFloat
public float toFloat(String name, float defaultValue)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property namedefaultValue- default value- Returns:
- property
-
toDouble
public double toDouble(String name, double defaultValue)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property namedefaultValue- default value- Returns:
- property
-
toLong
public long toLong(String name, long defaultValue)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property namedefaultValue- default value- Returns:
- property
-
toChar
public char toChar(String name, char defaultValue)
Get property. The method returns the default value if the property is not parsed.- Parameters:
name- property namedefaultValue- default value- Returns:
- property
-
-