java.lang.Object
io.xlate.edi.stream.PropertySupport
- Direct Known Subclasses:
EDIInputFactory,EDIOutputFactory
Abstract parent class for factories that support setting, retrieving, and checking
whether properties are supported.
-
Field Summary
FieldsModifier and TypeFieldDescriptionMap of properties actually configured by the subclass.Set of property keys/names supported by the subclass. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor, initialize fields to empty collections. -
Method Summary
Modifier and TypeMethodDescriptiongetProperty(String name) Get the value of a feature/property from the underlying implementationbooleanisPropertySupported(String name) Query the set of properties that this factory supports.voidsetProperty(String name, Object value) Allows the user to set specific feature/property on the underlying implementation.
-
Field Details
-
supportedProperties
Set of property keys/names supported by the subclass. -
properties
Map of properties actually configured by the subclass.
-
-
Constructor Details
-
PropertySupport
protected PropertySupport()Default constructor, initialize fields to empty collections.
-
-
Method Details
-
isPropertySupported
Query the set of properties that this factory supports.- Parameters:
name- - The name of the property (may not be null)- Returns:
- true if the property is supported and false otherwise
-
getProperty
Get the value of a feature/property from the underlying implementation- Parameters:
name- - The name of the property (may not be null)- Returns:
- The value of the property
- Throws:
IllegalArgumentException- if the property is not supported
-
setProperty
Allows the user to set specific feature/property on the underlying implementation. The underlying implementation is not required to support every setting of every property in the specification and may use IllegalArgumentException to signal that an unsupported property may not be set with the specified value.- Parameters:
name- - The name of the property (may not be null)value- - The value of the property- Throws:
IllegalArgumentException- if the property is not supported
-