Class FilteredParameters

All Implemented Interfaces:
Serializable, Cloneable, LenientComparable, org.opengis.parameter.GeneralParameterValue, org.opengis.parameter.ParameterValueGroup

final class FilteredParameters extends UnmodifiableParameterValueGroup
Wraps the given group of parameters, but hiding some parameters. This is used for hiding contextual parameters such as "semi_major". Hidden parameters will still be provided if explicitly requested. This filtered list is unmodifiable.
Since:
1.3
Version:
1.3
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • filtered

      private final org.opengis.parameter.GeneralParameterValue[] filtered
      The filtered parameter values.
  • Constructor Details

    • FilteredParameters

      private FilteredParameters(UnmodifiableParameterValueGroup source, org.opengis.parameter.GeneralParameterValue[] filtered)
      Creates a filtered view of given parameters.
  • Method Details

    • create

      static UnmodifiableParameterValueGroup create(UnmodifiableParameterValueGroup source, Predicate<? super org.opengis.parameter.GeneralParameterDescriptor> filter)
      Creates a filtered view of given parameters. This method takes a snapshot of descriptor list using the given filter. No reference to that filter is kept after this method execution.
      Parameters:
      source - the group of parameters where values are actually stored.
      filter - filter for deciding whether to keep a parameter.
      Returns:
      the filtered parameters. May be source itself.
    • values

      public List<org.opengis.parameter.GeneralParameterValue> values()
      Returns a filtered view over the parameter value.
      Specified by:
      values in interface org.opengis.parameter.ParameterValueGroup
      Overrides:
      values in class UnmodifiableParameterValueGroup
    • equals

      public boolean equals(Object object, ComparisonMode mode)
      Compares the specified object with this parameter for equality.
      Specified by:
      equals in interface LenientComparable
      Overrides:
      equals in class UnmodifiableParameterValueGroup
      Parameters:
      object - the object to compare to this.
      mode - the strictness level of the comparison.
      Returns:
      true if both objects are equal according the given comparison mode.
      See Also:
    • hashCode

      public int hashCode()
      Returns a hash value for this parameter.
      Overrides:
      hashCode in class UnmodifiableParameterValueGroup