public class Properties
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
id
The id.
|
protected java.lang.String |
name
The name.
|
protected java.util.List |
properties
The direct properties.
|
protected java.util.List |
subproperties
The subproperties.
|
protected java.lang.String |
type
The property type (defines the kind of property).
|
Constructor and Description |
---|
Properties()
Create a new properties.
|
Properties(java.lang.String name,
java.lang.String type,
java.lang.String id)
Create a new properties.
|
Modifier and Type | Method and Description |
---|---|
void |
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(java.lang.String type,
Properties subproperties)
Add a subproperties to a properties.
|
static boolean |
getBooleanProperty(Properties[] props,
java.lang.String type)
Get a boolean property.
|
boolean |
getBooleanProperty(java.lang.String type)
Get a boolean property.
|
double |
getDoubleProperty(java.lang.String type)
Get a double property.
|
java.lang.String |
getId()
Get the id.
|
static int |
getIntProperty(Properties[] props,
java.lang.String type)
Get an int property.
|
int |
getIntProperty(java.lang.String type)
Get an int property.
|
static Property |
getLatestProperty(Properties[] props,
java.lang.String type)
Get the latest property by type.
|
Property |
getLatestProperty(java.lang.String type)
Get the latest property by type.
|
static long |
getLongProperty(Properties[] props,
java.lang.String type)
Get a long property.
|
long |
getLongProperty(java.lang.String type)
Get a long property.
|
java.lang.String |
getName()
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.
|
Property |
getProperty(java.lang.String type)
Get a properties by type.
|
static java.lang.String |
getStringProperty(Properties[] props,
java.lang.String type)
Get a string property.
|
java.lang.String |
getStringProperty(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.
|
Properties |
getSubproperty(java.lang.String type)
Get a properties by type.
|
java.lang.String |
getType()
Get the type.
|
void |
removeSubproperties(java.lang.String type)
Remove all subproperties of a given type.
|
void |
setId(java.lang.String id)
Set the id.
|
void |
setName(java.lang.String name)
Set the name of the properties.
|
void |
setProperties(Property[] properties)
Set the properties.
|
void |
setSubproperties(Properties[] subproperties)
Set the subproperties.
|
void |
setType(java.lang.String type)
Set the type of the properties.
|
java.lang.String |
toString()
Get the string representation.
|
protected java.lang.String name
protected java.lang.String type
protected java.lang.String id
protected java.util.List properties
protected java.util.List subproperties
public Properties()
public Properties(java.lang.String name, java.lang.String type, java.lang.String id)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getType()
public void setType(java.lang.String type)
public java.lang.String getId()
public void setId(java.lang.String id)
public Property[] getProperties()
public void setProperties(Property[] properties)
properties
- The properties.public Properties[] getSubproperties()
public void setSubproperties(Properties[] subproperties)
subproperties
- The subproperties to set.public Property getProperty(java.lang.String type)
type
- The type name.public Property getLatestProperty(java.lang.String type)
type
- The type name.public Property[] getProperties(java.lang.String type)
type
- The type name.public Properties getSubproperty(java.lang.String type)
type
- The type name.public Properties[] getSubproperties(java.lang.String type)
type
- The type.public void addSubproperties(Properties props)
public void addSubproperties(java.lang.String type, Properties subproperties)
public void removeSubproperties(java.lang.String type)
public void addProperty(Property prop)
public boolean getBooleanProperty(java.lang.String type)
type
- The type.public long getLongProperty(java.lang.String type)
type
- The type.public int getIntProperty(java.lang.String type)
type
- The type.public double getDoubleProperty(java.lang.String type)
type
- The type.public java.lang.String getStringProperty(java.lang.String type)
type
- The type.public void addProperties(Properties toadd)
public static boolean getBooleanProperty(Properties[] props, java.lang.String type)
type
- The type.public static long getLongProperty(Properties[] props, java.lang.String type)
type
- The type.public static int getIntProperty(Properties[] props, java.lang.String type)
type
- The type.public static java.lang.String getStringProperty(Properties[] props, java.lang.String type)
type
- The type.public static Property getLatestProperty(Properties[] props, java.lang.String type)
type
- The type name.public static Properties[] getSubproperties(Properties[] props, java.lang.String type)
type
- The type.public static Property[] getProperties(Properties[] props, java.lang.String type)
type
- The type.public java.lang.String toString()
toString
in class java.lang.Object