Interface PropertyList
-
- All Superinterfaces:
java.lang.Iterable<Property>
- All Known Implementing Classes:
PropertyListImpl
public interface PropertyList extends java.lang.Iterable<Property>
Listing ofPropertyinstances.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PropertyaddProperty(java.lang.String name)Appends aPropertyto thisPropertyList.PropertyaddProperty(java.lang.String name, java.lang.String label)Appends aPropertyto thisPropertyList.voidclear()Clears thePropertyList.voidconfigureProperties(PropertyConfigurable configurable)PropertygetOrAddProperty(java.lang.String name)java.util.PropertiesgetProperties()Obtains thePropertiespopulated with thePropertyvalues.PropertygetProperty(java.lang.String name)Obtains the firstPropertyby the input name.java.lang.String[]getPropertyNames()Obtains the names of thePropertyinstances in the order they were added.java.lang.StringgetPropertyValue(java.lang.String name, java.lang.String defaultValue)Convenience method to obtain thePropertyvalue.voidnormalise()Normalises thePropertyinstances.voidremoveProperty(Property property)Removes thePropertyfrom thisPropertyList.voidsort(java.util.Comparator<? super Property> comparator)Enable sorting thePropertyinstances within thisPropertyList.
-
-
-
Method Detail
-
addProperty
Property addProperty(java.lang.String name, java.lang.String label)
Appends aPropertyto thisPropertyList.
-
addProperty
Property addProperty(java.lang.String name)
Appends aPropertyto thisPropertyList.
-
removeProperty
void removeProperty(Property property)
Removes thePropertyfrom thisPropertyList.- Parameters:
property-Propertyto be removed.
-
getPropertyNames
java.lang.String[] getPropertyNames()
Obtains the names of thePropertyinstances in the order they were added.- Returns:
- Names of the
Propertyinstances.
-
getProperty
Property getProperty(java.lang.String name)
Obtains the firstPropertyby 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 thePropertyvalue.
-
getProperties
java.util.Properties getProperties()
Obtains thePropertiespopulated with thePropertyvalues.- Returns:
- Populated
Properties.
-
clear
void clear()
Clears thePropertyList.
-
sort
void sort(java.util.Comparator<? super Property> comparator)
Enable sorting thePropertyinstances within thisPropertyList.- Parameters:
comparator-Comparatorto provide comparisons for sorting.
-
normalise
void normalise()
-
configureProperties
void configureProperties(PropertyConfigurable configurable)
- Parameters:
configurable-PropertyConfigurableto be configured with thePropertyvalues.
-
-