Package net.sourceforge.pmd.lang.metrics
Class MetricOptions
- java.lang.Object
-
- net.sourceforge.pmd.lang.metrics.MetricOptions
-
public class MetricOptions extends java.lang.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetricOptions
emptyOptions()
Returns an empty options bundle.boolean
equals(java.lang.Object o)
java.util.Set<MetricOption>
getOptions()
Returns an immutable set of options.int
hashCode()
static MetricOptions
ofOptions(java.util.Collection<? extends MetricOption> options)
Gets an options bundle from a collection of options.static MetricOptions
ofOptions(MetricOption option, MetricOption... options)
Gets an options bundle from options.java.lang.String
toString()
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getOptions
public java.util.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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
emptyOptions
public static MetricOptions emptyOptions()
Returns an empty options bundle.- Returns:
- An empty options bundle
-
ofOptions
public static MetricOptions ofOptions(java.util.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 argumentoptions
- Rest of the options- Returns:
- An options bundle
-
-