|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.api.config.domain.PropertyIndex
@NotThreadSafe public final class PropertyIndex
A index of property key to the full property information and the descriptor of the property.
Constructor Summary | |
---|---|
PropertyIndex(ConfigurationKey<?> configurationKey) Default constructor. |
Method Summary | |
---|---|
PropertyDefinition |
get(String propertyName) Returns the property definition for the given property name. |
ConfigurationKey<?> |
getConfigurationKey() Returns the key to the configuration the properties are part of. |
boolean |
isEmpty() Checks if the index contains at least one property. |
void |
register(PropertyDescriptor descriptor, Property property) Registers the property descriptor and property instance to the index. |
String |
toString() Returns the string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyIndex(@NotNull ConfigurationKey<?> configurationKey) throws de.smartics.util.lang.NullArgumentException
configurationKey
- the key to the configuration the properties are part of.
de.smartics.util.lang.NullArgumentException
- if
ConfigurationKey
is
null
.
Method Detail |
---|
public ConfigurationKey<?> getConfigurationKey()
public void register(PropertyDescriptor descriptor, Property property) throws de.smartics.util.lang.NullArgumentException, IllegalArgumentException, DuplicatePropertyDefinitionException
descriptor
- the descriptor of the property.
property
- the value and location information of the property.
de.smartics.util.lang.NullArgumentException
- if
descriptor
or
property
is
null
.
IllegalArgumentException
- if the descriptor and property do not match. They do not match if their property keys differ.
DuplicatePropertyDefinitionException
- if the same property descriptor is attempted to be registered twice. The clashing descriptors have the same property key.
public boolean isEmpty()
true
if there is no property,
false
otherwise.
@CheckForNull public PropertyDefinition get(@NotNull String propertyName) throws de.smartics.util.lang.NullArgumentException
propertyName
- the name of the property to find its definition in this index.
null
if it does not exist.
de.smartics.util.lang.NullArgumentException
- if
propertyName
is
null
.
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |