.x where x = 0, 1, ...x
- Since:
- 1.3 (Washington DC 2001 meeting)
- Author:
- E. Michael Maximilien (maxim@us.ibm.com)
Constructor Summary |
(package private) |
DefaultProperties.MultiProp(java.lang.String s)
Creates a DefaultMultiProp with base prop name passed |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultProperties.MultiProp
DefaultProperties.MultiProp(java.lang.String s)
- Creates a DefaultMultiProp with base prop name passed
- Parameters:
s
- the String base prop name
getBasePropertyName
public java.lang.String getBasePropertyName()
- Specified by:
getBasePropertyName
in interface JposProperties.MultiProperty
- Returns:
- the base property name for this multi-property that is the
name w/o the number suffix
getPropertyNames
public java.util.Iterator getPropertyNames()
- Specified by:
getPropertyNames
in interface JposProperties.MultiProperty
- Returns:
- an iterator of the property names for this multi-property
getSortedPropertyNames
public java.util.Iterator getSortedPropertyNames()
- Specified by:
getSortedPropertyNames
in interface JposProperties.MultiProperty
- Returns:
- an iterator of the property names alphabetically sorted for this multi-property
getPropertyValues
public java.util.Iterator getPropertyValues()
- Specified by:
getPropertyValues
in interface JposProperties.MultiProperty
- Returns:
- an iterator of the property values for this multi-property
getPropertyString
public java.lang.String getPropertyString(java.lang.String propName)
- Specified by:
getPropertyString
in interface JposProperties.MultiProperty
- Parameters:
propName
- the full property name .x- Returns:
- the value for this property from the full property name
getPropertyString
public java.lang.String getPropertyString(int i)
throws java.lang.IllegalArgumentException
- Specified by:
getPropertyString
in interface JposProperties.MultiProperty
- Parameters:
number
- suffix for the property name- Returns:
- the value for this property from the full property name
- Throws:
java.lang.IllegalArgumentException
- if the i negative
getNumberOfProperties
public int getNumberOfProperties()
- Specified by:
getNumberOfProperties
in interface JposProperties.MultiProperty
- Returns:
- the number of properties defined in this multi-property
propertyNumber
public int propertyNumber(java.lang.String propName)
throws java.lang.IllegalArgumentException
- Specified by:
propertyNumber
in interface JposProperties.MultiProperty
- Parameters:
propName
- the property name to get the number of- Returns:
- the number of this property name that is for property .x returns x
- Throws:
java.lang.IllegalArgumentException
- if the property name does not follow the .x name pattern
validatePropName
int validatePropName(java.lang.String propName)
throws java.lang.IllegalArgumentException
- Validates that propName passed is valid for this multi-prop
- Returns:
- the number of this property
- Throws:
java.lang.IllegalArgumentException
- if propName is not valid
add
void add(java.lang.String propName,
java.lang.String propValue)
throws java.lang.IllegalArgumentException
- Adds a new to this multi property
- Parameters:
propName
- the property namepropValue
- the property value- Throws:
java.lang.IllegalArgumentException
- if the propName does not match the base prop name
remove
java.lang.String remove(java.lang.String propName)
- Removes existing property by name propName. If property does not exist does nothing
- Parameters:
propName
- the property name- Returns:
- the propValue of the property removed or null if not found
This API and code belongs to the JavaPOS committee please see LISCENCE file for details