Package jadex.commons
Class Properties
- java.lang.Object
- 
- jadex.commons.Properties
 
- 
 public class Properties extends java.lang.ObjectThe configuration properties.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringidThe id.protected java.lang.StringnameThe name.protected java.util.ListpropertiesThe direct properties.protected java.util.ListsubpropertiesThe subproperties.protected java.lang.StringtypeThe property type (defines the kind of property).
 - 
Constructor SummaryConstructors Constructor Description Properties()Create a new properties.Properties(java.lang.String name, java.lang.String type, java.lang.String id)Create a new properties.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperties(Properties toadd)Add the complete content of another properties.voidaddProperty(Property prop)Add a property to this properties.voidaddSubproperties(Properties props)Add subproperties to this properties.voidaddSubproperties(java.lang.String type, Properties subproperties)Add a subproperties to a properties.static booleangetBooleanProperty(Properties[] props, java.lang.String type)Get a boolean property.booleangetBooleanProperty(java.lang.String type)Get a boolean property.doublegetDoubleProperty(java.lang.String type)Get a double property.java.lang.StringgetId()Get the id.static intgetIntProperty(Properties[] props, java.lang.String type)Get an int property.intgetIntProperty(java.lang.String type)Get an int property.static PropertygetLatestProperty(Properties[] props, java.lang.String type)Get the latest property by type.PropertygetLatestProperty(java.lang.String type)Get the latest property by type.static longgetLongProperty(Properties[] props, java.lang.String type)Get a long property.longgetLongProperty(java.lang.String type)Get a long property.java.lang.StringgetName()Get the name.Property[]getProperties()Get all properties.static Property[]getProperties(Properties[] props, java.lang.String type)Get properties by type.Property[]getProperties(java.lang.String type)Get properties by type.PropertygetProperty(java.lang.String type)Get a properties by type.static java.lang.StringgetStringProperty(Properties[] props, java.lang.String type)Get a string property.java.lang.StringgetStringProperty(java.lang.String type)Get a string property.Properties[]getSubproperties()Get all subproperties.static Properties[]getSubproperties(Properties[] props, java.lang.String type)Get subproperties by type.Properties[]getSubproperties(java.lang.String type)Get subproperties by type.PropertiesgetSubproperty(java.lang.String type)Get a properties by type.java.lang.StringgetType()Get the type.voidremoveSubproperties(java.lang.String type)Remove all subproperties of a given type.voidsetId(java.lang.String id)Set the id.voidsetName(java.lang.String name)Set the name of the properties.voidsetProperties(Property[] properties)Set the properties.voidsetSubproperties(Properties[] subproperties)Set the subproperties.voidsetType(java.lang.String type)Set the type of the properties.java.lang.StringtoString()Get the string representation.
 
- 
- 
- 
Field Detail- 
nameprotected java.lang.String name The name.
 - 
typeprotected java.lang.String type The property type (defines the kind of property).
 - 
idprotected java.lang.String id The id.
 - 
propertiesprotected java.util.List properties The direct properties.
 - 
subpropertiesprotected java.util.List subproperties The subproperties.
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Get the name.- Returns:
- The name.
 
 - 
setNamepublic void setName(java.lang.String name) Set the name of the properties.
 - 
getTypepublic java.lang.String getType() Get the type.- Returns:
- The type.
 
 - 
setTypepublic void setType(java.lang.String type) Set the type of the properties.
 - 
getIdpublic java.lang.String getId() Get the id.- Returns:
- The id.
 
 - 
setIdpublic void setId(java.lang.String id) Set the id.
 - 
getPropertiespublic Property[] getProperties() Get all properties.
 - 
setPropertiespublic void setProperties(Property[] properties) Set the properties.- Parameters:
- properties- The properties.
 
 - 
getSubpropertiespublic Properties[] getSubproperties() Get all subproperties.
 - 
setSubpropertiespublic void setSubproperties(Properties[] subproperties) Set the subproperties.- Parameters:
- subproperties- The subproperties to set.
 
 - 
getPropertypublic Property getProperty(java.lang.String type) Get a properties by type.- Parameters:
- type- The type name.
 
 - 
getLatestPropertypublic Property getLatestProperty(java.lang.String type) Get the latest property by type.- Parameters:
- type- The type name.
 
 - 
getPropertiespublic Property[] getProperties(java.lang.String type) Get properties by type.- Parameters:
- type- The type name.
 
 - 
getSubpropertypublic Properties getSubproperty(java.lang.String type) Get a properties by type.- Parameters:
- type- The type name.
 
 - 
getSubpropertiespublic Properties[] getSubproperties(java.lang.String type) Get subproperties by type.- Parameters:
- type- The type.
 
 - 
addSubpropertiespublic void addSubproperties(Properties props) Add subproperties to this properties.
 - 
addSubpropertiespublic void addSubproperties(java.lang.String type, Properties subproperties)Add a subproperties to a properties.
 - 
removeSubpropertiespublic void removeSubproperties(java.lang.String type) Remove all subproperties of a given type.
 - 
addPropertypublic void addProperty(Property prop) Add a property to this properties.
 - 
getBooleanPropertypublic boolean getBooleanProperty(java.lang.String type) Get a boolean property.- Parameters:
- type- The type.
- Returns:
- Returns false if the property is not set.
 
 - 
getLongPropertypublic long getLongProperty(java.lang.String type) Get a long property.- Parameters:
- type- The type.
- Returns:
- Returns the parsed long value, 0 if not set.
 
 - 
getIntPropertypublic int getIntProperty(java.lang.String type) Get an int property.- Parameters:
- type- The type.
- Returns:
- Returns the parsed int value, 0 if not set.
 
 - 
getDoublePropertypublic double getDoubleProperty(java.lang.String type) Get a double property.- Parameters:
- type- The type.
- Returns:
- Returns the parsed double value, 0 if not set.
 
 - 
getStringPropertypublic java.lang.String getStringProperty(java.lang.String type) Get a string property.- Parameters:
- type- The type.
- Returns:
- Returns the string value or null if not set.
 
 - 
addPropertiespublic void addProperties(Properties toadd) Add the complete content of another properties.
 - 
getBooleanPropertypublic static boolean getBooleanProperty(Properties[] props, java.lang.String type) Get a boolean property.- Parameters:
- type- The type.
- Returns:
- Returns false if the property is not set.
 
 - 
getLongPropertypublic static long getLongProperty(Properties[] props, java.lang.String type) Get a long property.- Parameters:
- type- The type.
- Returns:
- Returns the parsed long value, 0 if not set.
 
 - 
getIntPropertypublic static int getIntProperty(Properties[] props, java.lang.String type) Get an int property.- Parameters:
- type- The type.
- Returns:
- Returns the parsed int value, 0 if not set.
 
 - 
getStringPropertypublic static java.lang.String getStringProperty(Properties[] props, java.lang.String type) Get a string property.- Parameters:
- type- The type.
- Returns:
- Returns the string value or null if not set.
 
 - 
getLatestPropertypublic static Property getLatestProperty(Properties[] props, java.lang.String type) Get the latest property by type.- Parameters:
- type- The type name.
 
 - 
getSubpropertiespublic static Properties[] getSubproperties(Properties[] props, java.lang.String type) Get subproperties by type.- Parameters:
- type- The type.
 
 - 
getPropertiespublic static Property[] getProperties(Properties[] props, java.lang.String type) Get properties by type.- Parameters:
- type- The type.
 
 - 
toStringpublic java.lang.String toString() Get the string representation.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- The string representation.
 
 
- 
 
-