Class Parameters

java.lang.Object
org.apache.sis.parameter.Parameters
All Implemented Interfaces:
Cloneable, org.opengis.parameter.GeneralParameterValue, org.opengis.parameter.ParameterValueGroup
Direct Known Subclasses:
ContextualParameters, DefaultParameterValueGroup, Parameters.Wrapper, UnmodifiableParameterValueGroup

public abstract class Parameters extends Object implements org.opengis.parameter.ParameterValueGroup, Cloneable
Convenience methods for fetching parameter values despite the variations in parameter names, value types and units. See DefaultParameterValueGroup javadoc for a description of the standard way to get and set a particular parameter in a group. The remaining of this javadoc is specific to Apache SIS.

Convenience methods

This class provides the following convenience static methods: Most instance methods in this class follow the same naming pattern than the methods provided by the ParameterValue interface. Those methods are themselves inspired by JDK methods:
Methods fetching parameter value
Parameters method ParameterValue method JDK methods
getValue(ParameterDescriptor) getValue()
booleanValue(ParameterDescriptor) booleanValue() Boolean.booleanValue()
intValue(ParameterDescriptor) intValue() Number.intValue()
intValueList(ParameterDescriptor) intValueList()
doubleValue(ParameterDescriptor) doubleValue() Number.doubleValue()
doubleValueList(ParameterDescriptor) doubleValueList()
stringValue(ParameterDescriptor) stringValue()

Fetching parameter values despite different names, types or units

The common way to get a parameter is to invoke the ParameterValueGroup.parameter(String) method. This Parameters class provides alternative ways, using a ParameterDescriptor argument instead of a String argument. Those descriptors provide additional information like the various aliases under which the same parameter may be known. By using this information, Parameters can choose the most appropriate parameter name or alias (by searching for a common authority) when it delegates its work to the parameter(String) method.
Example: The same parameter may be known under different names. For example, the length of the semi-major axis of the ellipsoid is commonly known as "semi_major". But that parameter can also be named "semi_major_axis", "earth_radius" or simply "a" in other libraries. When fetching parameter values, we do not always know in advance which of the above-cited names is recognized by an arbitrary ParameterValueGroup instance.
Parameters uses also the descriptor information for applying type and unit conversions (i.e. returned values are converted to the units of measurement specified by the given parameter descriptor).

Note for subclass implementers

This class does not implement any method from the ParameterValueGroup interface (this class is not named “AbstractParameterValueGroup” for that reason). Extending this class or extending Object make almost no difference for implementers; Parameters purpose is mostly to extend the API for users convenience. All methods in this class get their information from the ParameterValueGroup methods. In addition, unless otherwise specified, methods in this class is isolated from all others: overriding one method has no impact on other methods.
Since:
0.4
Version:
1.3
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static final class 
    Wrappers used as a fallback by castOrWrap(ParameterValueGroup).
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    For subclass constructors only.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    booleanValue(org.opengis.parameter.ParameterDescriptor<Boolean> parameter)
    Returns the boolean value of the parameter identified by the given descriptor.
    static <T> org.opengis.parameter.ParameterDescriptor<T>
    cast(org.opengis.parameter.ParameterDescriptor<?> descriptor, Class<T> valueClass)
    Casts the given parameter descriptor to the given type.
    static <T> org.opengis.parameter.ParameterValue<T>
    cast(org.opengis.parameter.ParameterValue<?> parameter, Class<T> valueClass)
    Casts the given parameter value to the given type.
    static Parameters
    castOrWrap(org.opengis.parameter.ParameterValueGroup parameters)
    Returns the given parameter value group as a Parameters instance.
    Returns a copy of this group of parameter values.
    static void
    copy(org.opengis.parameter.ParameterValueGroup values, org.opengis.parameter.ParameterValueGroup destination)
    Copies the values of a parameter group into another parameter group.
    private static <T> T
    defaultValue(org.opengis.parameter.ParameterDescriptor<T> parameter)
    Returns the default value of the given descriptor, or throws an exception if the descriptor does not define a default value.
    double
    doubleValue(org.opengis.parameter.ParameterDescriptor<? extends Number> parameter)
    Returns the floating point value of the parameter identified by the given descriptor.
    double
    doubleValue(org.opengis.parameter.ParameterDescriptor<? extends Number> parameter, javax.measure.Unit<?> unit)
    Returns the floating point value of the parameter identified by the given descriptor, converted to the given unit of measurement.
    double[]
    doubleValueList(org.opengis.parameter.ParameterDescriptor<double[]> parameter)
    Returns the floating point values of the parameter identified by the given descriptor.
    static org.opengis.parameter.GeneralParameterDescriptor[]
    getDescriptors(org.opengis.parameter.GeneralParameterValue... parameters)
    Returns the descriptors of the given parameters, in the same order.
    <T> T
    getMandatoryValue(org.opengis.parameter.ParameterDescriptor<T> parameter)
    Returns the value of the parameter identified by the given descriptor, or throws an exception if none.
    static org.opengis.util.MemberName
    getMemberName(org.opengis.parameter.ParameterDescriptor<?> parameter)
    Gets the parameter name as an instance of MemberName.
    private String
    getName(org.opengis.parameter.GeneralParameterDescriptor source)
    Returns the name or alias of the given parameter for the authority code space expected by this group.
    <T> org.opengis.parameter.ParameterValue<T>
    getOrCreate(org.opengis.parameter.ParameterDescriptor<T> parameter)
    Returns the parameter identified by the given descriptor.
    private static org.opengis.parameter.GeneralParameterValue
    getOrCreate(org.opengis.parameter.ParameterValueGroup values, String name, int n)
    Returns the nth occurrence of the parameter of the given name.
    (package private) org.opengis.parameter.ParameterValue<?>
    getParameter(org.opengis.parameter.ParameterDescriptor<?> parameter)
    Returns the parameter value for the specified operation parameter.
    <T> T
    getValue(org.opengis.parameter.ParameterDescriptor<T> parameter)
    Returns the value of the parameter identified by the given descriptor, or null if none.
    static Range<?>
    getValueDomain(org.opengis.parameter.ParameterDescriptor<?> descriptor)
    Returns the domain of valid values defined by the given descriptor, or null if none.
    int
    intValue(org.opengis.parameter.ParameterDescriptor<? extends Number> parameter)
    Returns the integer value of the parameter identified by the given descriptor.
    int[]
    intValueList(org.opengis.parameter.ParameterDescriptor<int[]> parameter)
    Returns the integer values of the parameter identified by the given descriptor.
    (package private) boolean
    Returns true if this class is an implementation of an instance which is known to not override ParameterValueGroup.parameter(String) in a way incompatible with parameterIfExist(String).
    static boolean
    isUnmodifiable(org.opengis.parameter.ParameterValueGroup parameters)
    Returns true if the given parameter group is a non-null instance created by unmodifiable(…).
    (package private) org.opengis.parameter.ParameterValue<?>
    Returns the parameter of the given name, or null if it does not exist.
    void
    Prints a string representation of this group to the standard output stream.
    stringValue(org.opengis.parameter.ParameterDescriptor<? extends CharSequence> parameter)
    Returns the string value of the parameter identified by the given descriptor.
    Returns a string representation of this group.
    static Parameters
    unmodifiable(org.opengis.parameter.ParameterValueGroup parameters)
    Returns the given parameter value group as an unmodifiable Parameters instance.
    static Parameters
    unmodifiable(org.opengis.parameter.ParameterValueGroup parameters, Predicate<? super org.opengis.parameter.GeneralParameterDescriptor> filter)
    Returns the given parameter value group as an unmodifiable Parameters instance with some parameters hidden.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opengis.parameter.ParameterValueGroup

    addGroup, getDescriptor, groups, parameter, values
  • Constructor Details

    • Parameters

      protected Parameters()
      For subclass constructors only.
  • Method Details

    • isUnmodifiable

      public static boolean isUnmodifiable(org.opengis.parameter.ParameterValueGroup parameters)
      Returns true if the given parameter group is a non-null instance created by unmodifiable(…).
      Parameters:
      parameters - the parameter group to test. Can be null.
      Returns:
      whether the given parameters are non-null and unmodifiable.
      Since:
      1.3
    • unmodifiable

      public static Parameters unmodifiable(org.opengis.parameter.ParameterValueGroup parameters)
      Returns the given parameter value group as an unmodifiable Parameters instance. If the given parameters is already an unmodifiable instance of Parameters, then it is returned as-is. Otherwise this method copies all parameter values in a new, unmodifiable, parameter group instance.
      Parameters:
      parameters - the parameters to make unmodifiable, or null.
      Returns:
      an unmodifiable group with the same parameters than the given group, or null if the given argument was null.
      Since:
      0.7
      See Also:
    • unmodifiable

      public static Parameters unmodifiable(org.opengis.parameter.ParameterValueGroup parameters, Predicate<? super org.opengis.parameter.GeneralParameterDescriptor> filter)
      Returns the given parameter value group as an unmodifiable Parameters instance with some parameters hidden. The hidden parameters are excluded from the list returned by ParameterValueGroup.values(), but are otherwise still accessible when the hidden parameters is explicitly named in a call to ParameterValueGroup.parameter(String).
      Use case: this method is used for hiding parameters that should be inferred from the context. For example, the "semi_major" and "semi_minor" parameters are included in the list of MathTransform parameters because that class has no way to know the values if they are not explicitly provided. But those semi-axis length parameters should not be included in the list of CoordinateOperation parameters because they are inferred from the context (the source and target CRS).
      Parameters:
      parameters - the parameters to make unmodifiable, or null.
      filter - specifies which source parameters to keep visible, or null if no filtering.
      Returns:
      an unmodifiable group with the parameters of the given group to keep visible, or null if the parameters argument was null.
      Since:
      1.3
    • castOrWrap

      public static Parameters castOrWrap(org.opengis.parameter.ParameterValueGroup parameters)
      Returns the given parameter value group as a Parameters instance. If the given parameters is already an instance of Parameters, then it is returned as-is. Otherwise this method returns a wrapper which delegate all method invocations to the given instance.

      This method provides a way to get access to the non-static Parameters methods, like getValue(ParameterDescriptor), for an arbitrary ParameterValueGroup instance.

      Parameters:
      parameters - the object to cast or wrap, or null.
      Returns:
      the given argument as an instance of Parameters (may be the same reference), or null if the given argument was null.
    • cast

      public static <T> org.opengis.parameter.ParameterDescriptor<T> cast(org.opengis.parameter.ParameterDescriptor<?> descriptor, Class<T> valueClass) throws ClassCastException
      Casts the given parameter descriptor to the given type. An exception is thrown immediately if the parameter does not have the expected value class.
      Type Parameters:
      T - the expected value class.
      Parameters:
      descriptor - the descriptor to cast, or null.
      valueClass - the expected value class.
      Returns:
      the descriptor casted to the given value class, or null if the given descriptor was null.
      Throws:
      ClassCastException - if the given descriptor does not have the expected value class.
      See Also:
    • cast

      public static <T> org.opengis.parameter.ParameterValue<T> cast(org.opengis.parameter.ParameterValue<?> parameter, Class<T> valueClass) throws ClassCastException
      Casts the given parameter value to the given type. An exception is thrown immediately if the parameter does not have the expected value class.
      Type Parameters:
      T - the expected value class.
      Parameters:
      parameter - the parameter to cast, or null.
      valueClass - the expected value class.
      Returns:
      the value casted to the given type, or null if the given value was null.
      Throws:
      ClassCastException - if the given value doesn't have the expected value class.
      See Also:
    • getDescriptors

      public static org.opengis.parameter.GeneralParameterDescriptor[] getDescriptors(org.opengis.parameter.GeneralParameterValue... parameters)
      Returns the descriptors of the given parameters, in the same order. Special cases:
      • If the given array is null, then this method returns null.
      • If an element of the given array is null, then the corresponding element of the returned array is also null.
      Parameters:
      parameters - the parameter values from which to get the descriptors, or null.
      Returns:
      the descriptors of the given parameter values, or null if the parameters argument was null.
      Since:
      0.6
    • getMemberName

      public static org.opengis.util.MemberName getMemberName(org.opengis.parameter.ParameterDescriptor<?> parameter)
      Gets the parameter name as an instance of MemberName. This method performs the following checks:
      • If the primary name is an instance of MemberName (for example a NamedIdentifier subclass), returns that primary name.
      • Otherwise this method searches for the first alias which is an instance of MemberName (a subtype of aliases type). If found, that alias is returned.
      • If no alias is found, then this method tries to build a MemberName from the primary name and the value class, using the mapping defined in DefaultTypeName javadoc.
      This method can be used as a bridge between the parameter object defined by ISO 19111 (namely CC_OperationParameter) and the one defined by ISO 19115 (namely SV_Parameter).
      Parameters:
      parameter - the parameter from which to get the name (may be null).
      Returns:
      the member name, or null if none.
      Since:
      0.5
      See Also:
    • getValueDomain

      public static Range<?> getValueDomain(org.opengis.parameter.ParameterDescriptor<?> descriptor)
      Returns the domain of valid values defined by the given descriptor, or null if none. This method performs the following operations:
      Parameters:
      descriptor - the parameter descriptor, or null.
      Returns:
      the domain of valid values, or null if none.
      See Also:
    • getName

      private String getName(org.opengis.parameter.GeneralParameterDescriptor source)
      Returns the name or alias of the given parameter for the authority code space expected by this group. If no name or alias for this group's authority can be found, then the primary name will be returned.
      Parameters:
      source - the parameter for which the name is wanted.
      Returns:
      the name of the given parameter. May be null if there is no name at all, but such nameless descriptors are not legal.
    • parameterIfExist

      org.opengis.parameter.ParameterValue<?> parameterIfExist(String name) throws org.opengis.parameter.ParameterNotFoundException
      Returns the parameter of the given name, or null if it does not exist. The default implementation iterates over the ParameterValueGroup.values() and compares the descriptor names. The DefaultParameterValueGroup subclass will override this method with a more efficient implementation which avoid creating some deferred parameters.
      Throws:
      org.opengis.parameter.ParameterNotFoundException
    • getParameter

      org.opengis.parameter.ParameterValue<?> getParameter(org.opengis.parameter.ParameterDescriptor<?> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the parameter value for the specified operation parameter. This method tries to do the same work than ParameterValueGroup.parameter(String) but without instantiating optional parameters if that parameter was not already instantiated.
      Performance note: profiling shows that this method is costly. To mitigate the problem, DefaultParameterValueGroup overrides this method with a quick comparisons of descriptor references before to fallback on this more generic implementation.
      Parameters:
      parameter - the parameter to search.
      Returns:
      the requested parameter value, or null if none.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
    • isKnownImplementation

      boolean isKnownImplementation()
      Returns true if this class is an implementation of an instance which is known to not override ParameterValueGroup.parameter(String) in a way incompatible with parameterIfExist(String). The DefaultParameterValueGroup class needs to override this method.
    • getValue

      public <T> T getValue(org.opengis.parameter.ParameterDescriptor<T> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the value of the parameter identified by the given descriptor, or null if none. This method uses the following information from the given parameter descriptor:
      • The most appropriate name or alias to use for searching in this ParameterValueGroup, chosen as below:
        • a name or alias defined by the same authority, if any;
        • an arbitrary name or alias otherwise.
      • The default value to return if there is no value associated to the above-cited name or alias.
      • The unit of measurement (if any) of numerical value to return.
      • The type of value to return.
      This method can be useful when the ParameterDescriptor are known in advance, for example in the implementation of some coordinate operation method. If the caller has no such ParameterDescriptor at hand, then the parameter(String) method is probably more convenient.
      Type Parameters:
      T - the type of the parameter value.
      Parameters:
      parameter - the name or alias of the parameter to look for, together with the desired type and unit of value.
      Returns:
      the requested parameter value if it exists, or the default value otherwise (which may be null).
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      UnconvertibleObjectException - if the parameter value cannot be converted to the expected type.
      Since:
      0.6
      See Also:
    • getMandatoryValue

      public <T> T getMandatoryValue(org.opengis.parameter.ParameterDescriptor<T> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the value of the parameter identified by the given descriptor, or throws an exception if none. The default implementation performs the same work than getValue(ParameterDescriptor) and verifies that the returned value is non-null.
      Type Parameters:
      T - the type of the parameter value.
      Parameters:
      parameter - the name or alias of the parameter to look for, together with the desired type and unit of value.
      Returns:
      the requested parameter value if it exists, or the default value otherwise provided that it is not null.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      IllegalStateException - if the value is not defined and there is no default value.
      Since:
      0.7
      See Also:
    • defaultValue

      private static <T> T defaultValue(org.opengis.parameter.ParameterDescriptor<T> parameter) throws IllegalStateException
      Returns the default value of the given descriptor, or throws an exception if the descriptor does not define a default value. This check should be kept consistent with the DefaultParameterValue.missingOrIncompatibleValue(Object) check.
      Throws:
      IllegalStateException
    • booleanValue

      public boolean booleanValue(org.opengis.parameter.ParameterDescriptor<Boolean> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the boolean value of the parameter identified by the given descriptor. See getValue(ParameterDescriptor) for more information about how this method uses the given parameter argument.
      Parameters:
      parameter - the name or alias of the parameter to look for.
      Returns:
      the requested parameter value if it exists, or the non-null default value otherwise.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      IllegalStateException - if the value is not defined and there is no default value.
      Since:
      0.6
      See Also:
    • intValue

      public int intValue(org.opengis.parameter.ParameterDescriptor<? extends Number> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the integer value of the parameter identified by the given descriptor. See getValue(ParameterDescriptor) for more information about how this method uses the given parameter argument.
      Parameters:
      parameter - the name or alias of the parameter to look for.
      Returns:
      the requested parameter value if it exists, or the non-null default value otherwise.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      IllegalStateException - if the value is not defined and there is no default value.
      Since:
      0.6
      See Also:
    • intValueList

      public int[] intValueList(org.opengis.parameter.ParameterDescriptor<int[]> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the integer values of the parameter identified by the given descriptor. See getValue(ParameterDescriptor) for more information about how this method uses the given parameter argument.
      Parameters:
      parameter - the name or alias of the parameter to look for.
      Returns:
      the requested parameter values if they exist, or the non-null default value otherwise.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      IllegalStateException - if the value is not defined and there is no default value.
      Since:
      0.6
      See Also:
    • doubleValue

      public double doubleValue(org.opengis.parameter.ParameterDescriptor<? extends Number> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the floating point value of the parameter identified by the given descriptor. See getValue(ParameterDescriptor) for more information about how this method uses the given parameter argument.

      If the given descriptor supplies a unit of measurement, then the returned value will be converted into that unit.

      Parameters:
      parameter - the name or alias of the parameter to look for.
      Returns:
      the requested parameter value if it exists, or the non-null default value otherwise.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      IllegalStateException - if the value is not defined and there is no default value.
      Since:
      0.6
      See Also:
    • doubleValue

      public double doubleValue(org.opengis.parameter.ParameterDescriptor<? extends Number> parameter, javax.measure.Unit<?> unit) throws org.opengis.parameter.ParameterNotFoundException
      Returns the floating point value of the parameter identified by the given descriptor, converted to the given unit of measurement. See getValue(ParameterDescriptor) for more information about how this method uses the given parameter argument.
      Parameters:
      parameter - the name or alias of the parameter to look for.
      unit - the desired unit of measurement.
      Returns:
      the requested parameter value if it exists, or the non-null default value otherwise.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      IllegalStateException - if the value is not defined and there is no default value.
      IllegalArgumentException - if the specified unit is invalid for the parameter.
      Since:
      1.3
      See Also:
    • doubleValueList

      public double[] doubleValueList(org.opengis.parameter.ParameterDescriptor<double[]> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the floating point values of the parameter identified by the given descriptor. See getValue(ParameterDescriptor) for more information about how this method uses the given parameter argument.

      If the given descriptor supplies a unit of measurement, then the returned values will be converted into that unit.

      Parameters:
      parameter - the name or alias of the parameter to look for.
      Returns:
      the requested parameter values if they exists, or the non-null default value otherwise.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      IllegalStateException - if the value is not defined and there is no default value.
      Since:
      0.6
      See Also:
    • stringValue

      public String stringValue(org.opengis.parameter.ParameterDescriptor<? extends CharSequence> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the string value of the parameter identified by the given descriptor. See getValue(ParameterDescriptor) for more information about how this method uses the given parameter argument.
      Parameters:
      parameter - the name or alias of the parameter to look for.
      Returns:
      the requested parameter value if it exists, or the non-null default value otherwise.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      IllegalStateException - if the value is not defined and there is no default value.
      Since:
      0.6
      See Also:
    • getOrCreate

      public <T> org.opengis.parameter.ParameterValue<T> getOrCreate(org.opengis.parameter.ParameterDescriptor<T> parameter) throws org.opengis.parameter.ParameterNotFoundException
      Returns the parameter identified by the given descriptor. If the identified parameter is optional and not yet created, then it will be created now.

      The default implementation is equivalent to:

      where name is a parameter name or alias chosen by the same algorithm than getValue(ParameterDescriptor).
      Type Parameters:
      T - the type of the parameter value.
      Parameters:
      parameter - the parameter to look for.
      Returns:
      the requested parameter instance.
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given parameter name or alias is not legal for this group.
      Since:
      0.6
      See Also:
    • clone

      public Parameters clone()
      Returns a copy of this group of parameter values. The default implementation performs a shallow copy, but subclasses are encouraged to perform a deep copy.
      Specified by:
      clone in interface org.opengis.parameter.GeneralParameterValue
      Specified by:
      clone in interface org.opengis.parameter.ParameterValueGroup
      Overrides:
      clone in class Object
      Returns:
      a copy of this group of parameter values.
      See Also:
    • copy

      public static void copy(org.opengis.parameter.ParameterValueGroup values, org.opengis.parameter.ParameterValueGroup destination) throws org.opengis.parameter.InvalidParameterNameException, org.opengis.parameter.InvalidParameterValueException
      Copies the values of a parameter group into another parameter group. All values in the source group shall be valid for the destination group, but the destination may have more parameters. Sub-groups are copied recursively.

      A typical usage of this method is for transferring values from an arbitrary implementation to some specific implementation, or to a parameter group using a different but compatible descriptor.

      Parameters:
      values - the parameter values to copy.
      destination - where to copy the values.
      Throws:
      org.opengis.parameter.InvalidParameterNameException - if a source parameter name is unknown to the destination.
      org.opengis.parameter.InvalidParameterValueException - if the value of a source parameter is invalid for the destination.
      Since:
      0.5
      See Also:
    • getOrCreate

      private static org.opengis.parameter.GeneralParameterValue getOrCreate(org.opengis.parameter.ParameterValueGroup values, String name, int n)
      Returns the nth occurrence of the parameter of the given name. This method is not public because ISO 19111 does not allow multi-occurrences of parameter values (this is a SIS-specific flexibility). Current implementation is not very efficient, but it should not be an issue if this method is rarely invoked.
      Parameters:
      values - the group from which to get or create a value
      name - the name of the parameter to fetch. An exact match will be required.
      n - number of occurrences to skip before to return or create the parameter.
      Returns:
      the nth occurrence (zero-based) of the parameter of the given name.
      Throws:
      IndexOutOfBoundsException - if n is greater than the current number of parameters of the given name.
    • toString

      public String toString()
      Returns a string representation of this group. The default implementation delegates to ParameterFormat.

      This method is for information purpose only and may change in future SIS version.

      Overrides:
      toString in class Object
      Since:
      0.7
    • print

      @Debug public void print()
      Prints a string representation of this group to the standard output stream. If a console is attached to the running JVM (i.e. if the application is run from the command-line and the output is not redirected to a file) and if Apache SIS thinks that the console supports the ANSI escape codes (a.k.a. X3.64), then a syntax coloring will be applied.

      This is a convenience method for debugging purpose and for console applications.

      Since:
      0.7