Interface PropertyList
-
- All Superinterfaces:
java.lang.Iterable<Property>
- All Known Implementing Classes:
PropertyListImpl
public interface PropertyList extends java.lang.Iterable<Property>
Listing ofProperty
instances.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Property
addProperty(java.lang.String name)
Appends aProperty
to thisPropertyList
.Property
addProperty(java.lang.String name, java.lang.String label)
Appends aProperty
to thisPropertyList
.void
clear()
Clears thePropertyList
.void
configureProperties(PropertyConfigurable configurable)
Property
getOrAddProperty(java.lang.String name)
java.util.Properties
getProperties()
Obtains theProperties
populated with theProperty
values.Property
getProperty(java.lang.String name)
Obtains the firstProperty
by the input name.java.lang.String[]
getPropertyNames()
Obtains the names of theProperty
instances in the order they were added.java.lang.String
getPropertyValue(java.lang.String name, java.lang.String defaultValue)
Convenience method to obtain theProperty
value.void
normalise()
Normalises theProperty
instances.void
removeProperty(Property property)
Removes theProperty
from thisPropertyList
.void
sort(java.util.Comparator<? super Property> comparator)
Enable sorting theProperty
instances within thisPropertyList
.
-
-
-
Method Detail
-
addProperty
Property addProperty(java.lang.String name, java.lang.String label)
Appends aProperty
to thisPropertyList
.
-
addProperty
Property addProperty(java.lang.String name)
Appends aProperty
to thisPropertyList
.
-
removeProperty
void removeProperty(Property property)
Removes theProperty
from thisPropertyList
.- Parameters:
property
-Property
to be removed.
-
getPropertyNames
java.lang.String[] getPropertyNames()
Obtains the names of theProperty
instances in the order they were added.- Returns:
- Names of the
Property
instances.
-
getProperty
Property getProperty(java.lang.String name)
Obtains the firstProperty
by the input name.
-
getOrAddProperty
Property getOrAddProperty(java.lang.String name)
-
getPropertyValue
java.lang.String getPropertyValue(java.lang.String name, java.lang.String defaultValue)
Convenience method to obtain theProperty
value.
-
getProperties
java.util.Properties getProperties()
Obtains theProperties
populated with theProperty
values.- Returns:
- Populated
Properties
.
-
clear
void clear()
Clears thePropertyList
.
-
sort
void sort(java.util.Comparator<? super Property> comparator)
Enable sorting theProperty
instances within thisPropertyList
.- Parameters:
comparator
-Comparator
to provide comparisons for sorting.
-
normalise
void normalise()
-
configureProperties
void configureProperties(PropertyConfigurable configurable)
- Parameters:
configurable
-PropertyConfigurable
to be configured with theProperty
values.
-
-