public class Properties extends Object
Constructor and Description |
---|
Properties()
Create a new properties.
|
Properties(String name,
String type,
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(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.
|
String |
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.
|
Property |
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.
|
String |
getName()
Get the name.
|
Property[] |
getProperties()
Get all properties.
|
static Property[] |
getProperties(Properties[] props,
String type)
Get properties by type.
|
Property[] |
getProperties(String type)
Get properties by type.
|
Property |
getProperty(String type)
Get a properties by type.
|
static String |
getStringProperty(Properties[] props,
String type)
Get a string property.
|
String |
getStringProperty(String type)
Get a string property.
|
Properties[] |
getSubproperties()
Get all subproperties.
|
static Properties[] |
getSubproperties(Properties[] props,
String type)
Get subproperties by type.
|
Properties[] |
getSubproperties(String type)
Get subproperties by type.
|
Properties |
getSubproperty(String type)
Get a properties by type.
|
String |
getType()
Get the type.
|
void |
removeSubproperties(String type)
Remove all subproperties of a given type.
|
void |
setId(String id)
Set the id.
|
void |
setName(String name)
Set the name of the properties.
|
void |
setProperties(Property[] properties)
Set the properties.
|
void |
setSubproperties(Properties[] subproperties)
Set the subproperties.
|
void |
setType(String type)
Set the type of the properties.
|
String |
toString()
Get the string representation.
|
public String getName()
public void setName(String name)
public String getType()
public void setType(String type)
public String getId()
public void setId(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(String type)
type
- The type name.public Property getLatestProperty(String type)
type
- The type name.public Property[] getProperties(String type)
type
- The type name.public Properties getSubproperty(String type)
type
- The type name.public Properties[] getSubproperties(String type)
type
- The type.public void addSubproperties(Properties props)
public void addSubproperties(String type, Properties subproperties)
public void removeSubproperties(String type)
public void addProperty(Property prop)
public boolean getBooleanProperty(String type)
type
- The type.public long getLongProperty(String type)
type
- The type.public int getIntProperty(String type)
type
- The type.public double getDoubleProperty(String type)
type
- The type.public String getStringProperty(String type)
type
- The type.public void addProperties(Properties toadd)
public static boolean getBooleanProperty(Properties[] props, String type)
type
- The type.public static long getLongProperty(Properties[] props, String type)
type
- The type.public static int getIntProperty(Properties[] props, String type)
type
- The type.public static String getStringProperty(Properties[] props, String type)
type
- The type.public static Property getLatestProperty(Properties[] props, String type)
type
- The type name.public static Properties[] getSubproperties(Properties[] props, String type)
type
- The type.public static Property[] getProperties(Properties[] props, String type)
type
- The type.Copyright © 2012. All Rights Reserved.