Package org.apache.sis.parameter
Class UnmodifiableParameterValueGroup
java.lang.Object
org.apache.sis.parameter.Parameters
org.apache.sis.parameter.UnmodifiableParameterValueGroup
- All Implemented Interfaces:
Serializable,Cloneable,LenientComparable,org.opengis.parameter.GeneralParameterValue,org.opengis.parameter.ParameterValueGroup
- Direct Known Subclasses:
FilteredParameters
A parameter value group which cannot be modified. This is especially important for parameters of
defining conversions since the same instance can be used for various source and target CRS.
Since
EPSGFactory caches the Conversion instances,
unexpected behavior results if the parameters of a cached conversion have been modified, for example with
the addition of semi_major and semi_minor parameters by DefaultMathTransformFactory.- Since:
- 0.7
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.opengis.parameter.ParameterDescriptorGroupThe parameter descriptor.private static final longSerial number for inter-operability with different versions.private final List<org.opengis.parameter.GeneralParameterValue>The parameter values. -
Constructor Summary
ConstructorsModifierConstructorDescription(package private)Creates a copy of the given parameter group.privateUnmodifiableParameterValueGroup(org.opengis.parameter.ParameterValueGroup group, Map<org.opengis.parameter.ParameterValueGroup, Boolean> done) Creates a new unmodifiable parameter group. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.opengis.parameter.ParameterValueGroupOperation not allowed.clone()Returns a modifiable copy of this parameter value group.(package private) static UnmodifiableParameterValueGroupcreate(org.opengis.parameter.ParameterValueGroup group) Creates a new unmodifiable parameter group.final booleanCompares the specified object with this parameter for equality.booleanequals(Object object, ComparisonMode mode) Compares the specified object with this parameter for equality.org.opengis.parameter.ParameterDescriptorGroupReturns the abstract definition of this group of parameters.List<org.opengis.parameter.ParameterValueGroup>Returns all subgroups with the specified name.inthashCode()Returns a hash value for this parameter.(package private) final booleanSpecifies that this class does not overrideparameter(String)in a way incompatible withParameters.parameterIfExist(String).final org.opengis.parameter.ParameterValue<?>Returns the value in this group for the specified name.List<org.opengis.parameter.GeneralParameterValue>values()Returns the values in this group.Methods inherited from class org.apache.sis.parameter.Parameters
booleanValue, cast, cast, castOrWrap, copy, doubleValue, doubleValue, doubleValueList, getDescriptors, getMandatoryValue, getMemberName, getOrCreate, getParameter, getValue, getValueDomain, intValue, intValueList, isUnmodifiable, parameterIfExist, print, stringValue, toString, unmodifiable, unmodifiable
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
descriptor
private final org.opengis.parameter.ParameterDescriptorGroup descriptorThe parameter descriptor.- See Also:
-
values
The parameter values.- See Also:
-
-
Constructor Details
-
UnmodifiableParameterValueGroup
UnmodifiableParameterValueGroup(UnmodifiableParameterValueGroup group) Creates a copy of the given parameter group. This is used byFilteredParametersconstructor only.- Parameters:
group- the group of values to copy.
-
UnmodifiableParameterValueGroup
private UnmodifiableParameterValueGroup(org.opengis.parameter.ParameterValueGroup group, Map<org.opengis.parameter.ParameterValueGroup, Boolean> done) Creates a new unmodifiable parameter group.- Parameters:
group- the group of values to copy.done- an initially empty map used for protection against circular references.- See Also:
-
-
Method Details
-
create
Creates a new unmodifiable parameter group.- Parameters:
group- the group of values to copy, ornull.- Returns:
- the unmodifiable parameter group, or
nullif the given argument was null.
-
getDescriptor
public org.opengis.parameter.ParameterDescriptorGroup getDescriptor()Returns the abstract definition of this group of parameters.- Specified by:
getDescriptorin interfaceorg.opengis.parameter.GeneralParameterValue- Specified by:
getDescriptorin interfaceorg.opengis.parameter.ParameterValueGroup
-
values
Returns the values in this group.- Specified by:
valuesin interfaceorg.opengis.parameter.ParameterValueGroup
-
isKnownImplementation
final boolean isKnownImplementation()Specifies that this class does not overrideparameter(String)in a way incompatible withParameters.parameterIfExist(String).- Overrides:
isKnownImplementationin classParameters
-
parameter
public final org.opengis.parameter.ParameterValue<?> parameter(String name) throws org.opengis.parameter.ParameterNotFoundException Returns the value in this group for the specified name.- Specified by:
parameterin interfaceorg.opengis.parameter.ParameterValueGroup- Throws:
org.opengis.parameter.ParameterNotFoundException
-
groups
public List<org.opengis.parameter.ParameterValueGroup> groups(String name) throws org.opengis.parameter.ParameterNotFoundException Returns all subgroups with the specified name.- Specified by:
groupsin interfaceorg.opengis.parameter.ParameterValueGroup- Throws:
org.opengis.parameter.ParameterNotFoundException
-
addGroup
public final org.opengis.parameter.ParameterValueGroup addGroup(String name) throws IllegalStateException Operation not allowed.- Specified by:
addGroupin interfaceorg.opengis.parameter.ParameterValueGroup- Throws:
IllegalStateException
-
clone
Returns a modifiable copy of this parameter value group.- Specified by:
clonein interfaceorg.opengis.parameter.GeneralParameterValue- Specified by:
clonein interfaceorg.opengis.parameter.ParameterValueGroup- Overrides:
clonein classParameters- Returns:
- a copy of this group of parameter values.
- See Also:
-
equals
Compares the specified object with this parameter for equality. The strictness level is controlled by the second argument:ComparisonMode.STRICTandBY_CONTRACTtake in account the parameter order.ComparisonMode.IGNORE_METADATAandAPPROXIMATEignore the order of parameter values (but not necessarily the order of parameter descriptors).
- Specified by:
equalsin interfaceLenientComparable- Parameters:
object- the object to compare tothis.mode- the strictness level of the comparison.- Returns:
trueif both objects are equal according the given comparison mode.- See Also:
-
equals
Compares the specified object with this parameter for equality.- Specified by:
equalsin interfaceLenientComparable- Overrides:
equalsin classObject- Parameters:
object- the object to compare tothis.- Returns:
trueif both objects are equal.- See Also:
-
hashCode
public int hashCode()Returns a hash value for this parameter.
-