Package net.sourceforge.pmd.lang.metrics
Class MetricOptions
java.lang.Object
net.sourceforge.pmd.lang.metrics.MetricOptions
Bundles a set of options to pass to a metric. Metrics may use these options as they see fit.
- Author:
- Clément Fournier
- Since:
- 6.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(MetricOption option) Returns true if this bundle contains the given option.static MetricOptionsReturns an empty options bundle.booleanReturns an immutable set of options.inthashCode()static MetricOptionsofOptions(Collection<? extends MetricOption> options) Gets an options bundle from a collection of options.static MetricOptionsofOptions(MetricOption option, MetricOption... options) Gets an options bundle from options.toString()
-
Method Details
-
equals
-
hashCode
public int hashCode() -
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
Returns true if this bundle contains the given option.- Parameters:
option- Option to look for
-
toString
-
emptyOptions
Returns an empty options bundle.- Returns:
- An empty options bundle
-
ofOptions
Gets an options bundle from a collection of options.- Parameters:
options- The options to build the bundle from- Returns:
- An options bundle
-
ofOptions
Gets an options bundle from options.- Parameters:
option- Mandatory first argumentoptions- Rest of the options- Returns:
- An options bundle
-