Class MetricOptions


  • public class MetricOptions
    extends Object
    Bundles a set of options to pass to a metric. Metrics may use these options as they see fit.
    Since:
    6.0.0
    Author:
    Clément Fournier
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getOptions

        public Set<MetricOption> getOptions()
        Returns an immutable set of options. Metrics may use these options as they see fit.
        Returns:
        The set of options of this version
      • contains

        public boolean contains​(MetricOption option)
        Returns true if this bundle contains the given option.
        Parameters:
        option - Option to look for
      • emptyOptions

        public static MetricOptions emptyOptions()
        Returns an empty options bundle.
        Returns:
        An empty options bundle
      • ofOptions

        public static MetricOptions ofOptions​(Collection<? extends MetricOption> options)
        Gets an options bundle from a collection of options.
        Parameters:
        options - The options to build the bundle from
        Returns:
        An options bundle
      • ofOptions

        public static MetricOptions ofOptions​(MetricOption option,
                                              MetricOption... options)
        Gets an options bundle from options.
        Parameters:
        option - Mandatory first argument
        options - Rest of the options
        Returns:
        An options bundle