Package jadex.common
Class Properties
java.lang.Object
jadex.common.Properties
The configuration properties.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new properties.Properties(String name, String type, String id) Create a new properties. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperties(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(String type, Properties subproperties) Add a subproperties to a properties.static booleangetBooleanProperty(Properties[] props, String type) Get a boolean property.booleangetBooleanProperty(String type) Get a boolean property.doublegetDoubleProperty(String type) Get a double property.getId()Get the id.static intgetIntProperty(Properties[] props, String type) Get an int property.intgetIntProperty(String type) Get an int property.static PropertygetLatestProperty(Properties[] props, String type) Get the latest property by type.getLatestProperty(String type) Get the latest property by type.static longgetLongProperty(Properties[] props, String type) Get a long property.longgetLongProperty(String type) Get a long property.getName()Get the name.Property[]Get all properties.static Property[]getProperties(Properties[] props, String type) Get properties by type.Property[]getProperties(String type) Get properties by type.getProperty(String type) Get a properties by type.static StringgetStringProperty(Properties[] props, String type) Get a string property.getStringProperty(String type) Get a string property.Get all subproperties.static Properties[]getSubproperties(Properties[] props, String type) Get subproperties by type.getSubproperties(String type) Get subproperties by type.getSubproperty(String type) Get a properties by type.getType()Get the type.voidremoveSubproperties(String type) Remove all subproperties of a given type.voidSet the id.voidSet the name of the properties.voidsetProperties(Property[] properties) Set the properties.voidsetSubproperties(Properties[] subproperties) Set the subproperties.voidSet the type of the properties.toString()Get the string representation.
-
Field Details
-
name
The name. -
type
The property type (defines the kind of property). -
id
The id. -
properties
The direct properties. -
subproperties
The subproperties.
-
-
Constructor Details
-
Properties
public Properties()Create a new properties. -
Properties
Create a new properties.
-
-
Method Details
-
getName
Get the name.- Returns:
- The name.
-
setName
Set the name of the properties. -
getType
Get the type.- Returns:
- The type.
-
setType
Set the type of the properties. -
getId
Get the id.- Returns:
- The id.
-
setId
Set the id. -
getProperties
Get all properties. -
setProperties
Set the properties.- Parameters:
properties- The properties.
-
getSubproperties
Get all subproperties. -
setSubproperties
Set the subproperties.- Parameters:
subproperties- The subproperties to set.
-
getProperty
Get a properties by type.- Parameters:
type- The type name.
-
getLatestProperty
Get the latest property by type.- Parameters:
type- The type name.
-
getProperties
Get properties by type.- Parameters:
type- The type name.
-
getSubproperty
Get a properties by type.- Parameters:
type- The type name.
-
getSubproperties
Get subproperties by type.- Parameters:
type- The type.
-
addSubproperties
Add subproperties to this properties. -
addSubproperties
Add a subproperties to a properties. -
removeSubproperties
Remove all subproperties of a given type. -
addProperty
Add a property to this properties. -
getBooleanProperty
Get a boolean property.- Parameters:
type- The type.- Returns:
- Returns false if the property is not set.
-
getLongProperty
Get a long property.- Parameters:
type- The type.- Returns:
- Returns the parsed long value, 0 if not set.
-
getIntProperty
Get an int property.- Parameters:
type- The type.- Returns:
- Returns the parsed int value, 0 if not set.
-
getDoubleProperty
Get a double property.- Parameters:
type- The type.- Returns:
- Returns the parsed double value, 0 if not set.
-
getStringProperty
Get a string property.- Parameters:
type- The type.- Returns:
- Returns the string value or null if not set.
-
addProperties
Add the complete content of another properties. -
getBooleanProperty
Get a boolean property.- Parameters:
type- The type.- Returns:
- Returns false if the property is not set.
-
getLongProperty
Get a long property.- Parameters:
type- The type.- Returns:
- Returns the parsed long value, 0 if not set.
-
getIntProperty
Get an int property.- Parameters:
type- The type.- Returns:
- Returns the parsed int value, 0 if not set.
-
getStringProperty
Get a string property.- Parameters:
type- The type.- Returns:
- Returns the string value or null if not set.
-
getLatestProperty
Get the latest property by type.- Parameters:
type- The type name.
-
getSubproperties
Get subproperties by type.- Parameters:
type- The type.
-
getProperties
Get properties by type.- Parameters:
type- The type.
-
toString
Get the string representation.
-