|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.api.core.domain.PropertyKey
public final class PropertyKey
Defines a property key information. A property key uniquely identifies a property. It contains a name that is scoped by the name of the property set. That is, the name is only unique within its property set. To create the fully qualified property key, call toString()
.
Constructor Summary | |
---|---|
PropertyKey(String name) Convenience constructor without a property set name. |
|
PropertyKey(String propertySet, String name) Default constructor. |
Method Summary | |
---|---|
int |
compareTo(PropertyKey o) |
static PropertyKey |
create(String qualifiedName) Creates an instance for the given qualified name. |
static PropertyKey |
create(String qualifiedName, char separator) Creates an instance for the given qualified name. |
static PropertyKey |
create(String propertySet, String name) Creates an instance for the given set and name. |
boolean |
equals(Object object) |
String |
getName() Returns the name of the property. |
String |
getPropertySet() Returns the name of the set the property belongs to. |
int |
hashCode() |
String |
toString() Returns the string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyKey(String name) throws IllegalArgumentException
name
- the name of the property.
IllegalArgumentException
- if
name
is blank.
public PropertyKey(String propertySet, String name) throws IllegalArgumentException
propertySet
- the name of the set the property belongs to.
name
- the name of the property.
IllegalArgumentException
- if
propertySet
is blank but not
null
or if
name
is blank.
Method Detail |
---|
public static PropertyKey create(String qualifiedName)
The qualified name consists of two part that are separated by a 'at' ( @
) sign. The first part is the name of the property set, the second part the name of the property.
Example:
my-set@my.property.name
The last 'at' sign is significant for the separation. That is, the property set name may contain any number of 'at' signs. An 'at' sign at the end of the qualified name is ignored.
qualifiedName
- a name optionally prefixed with a property set name separated by a 'at' (
@
) sign.
public static PropertyKey create(String qualifiedName, char separator) throws de.smartics.util.lang.BlankArgumentException
qualifiedName
- a name optionally prefixed with a property set name separated by the last occurrence (excluding the very end) of the
separator
.
separator
- the separator to use if for some reason the default is not appropriate.
de.smartics.util.lang.BlankArgumentException
- if
qualifiedName
is blank.
public static PropertyKey create(String propertySet, String name) throws IllegalArgumentException
propertySet
- the name of the set the property belongs to.
name
- the name of the property.
IllegalArgumentException
- if
propertySet
is blank but not
null
or if
name
is blank.
public String getPropertySet()
name
is unique. It may be
null
(which indicates that the scope is global), but is must not be blank.
public String getName()
This value must not be null
.
public int compareTo(PropertyKey o)
compareTo
in interface
Comparable<PropertyKey>
public int hashCode()
hashCode
in class
Object
public boolean equals(Object object)
equals
in class
Object
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |