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 TypeMethodDescriptionvoid
addProperties
(Properties toadd) Add the complete content of another properties.void
addProperty
(Property prop) Add a property to this properties.void
addSubproperties
(Properties props) Add subproperties to this properties.void
addSubproperties
(String type, Properties subproperties) Add a subproperties to a properties.static boolean
getBooleanProperty
(Properties[] props, String type) Get a boolean property.boolean
getBooleanProperty
(String type) Get a boolean property.double
getDoubleProperty
(String type) Get a double property.getId()
Get the id.static int
getIntProperty
(Properties[] props, String type) Get an int property.int
getIntProperty
(String type) Get an int property.static Property
getLatestProperty
(Properties[] props, String type) Get the latest property by type.getLatestProperty
(String type) Get the latest property by type.static long
getLongProperty
(Properties[] props, String type) Get a long property.long
getLongProperty
(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 String
getStringProperty
(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.void
removeSubproperties
(String type) Remove all subproperties of a given type.void
Set the id.void
Set the name of the properties.void
setProperties
(Property[] properties) Set the properties.void
setSubproperties
(Properties[] subproperties) Set the subproperties.void
Set 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.
-