Class CustomMetric

java.lang.Object
org.springframework.data.geo.CustomMetric
All Implemented Interfaces:
Serializable, Metric

public class CustomMetric extends Object implements Metric
Value object to create custom Metrics on the fly.
Since:
1.8
Author:
Oliver Gierke, Thomas Darimont
See Also:
  • Constructor Details

    • CustomMetric

      public CustomMetric(double multiplier)
      Creates a custom Metric using the given multiplier.
      Parameters:
      multiplier -
    • CustomMetric

      public CustomMetric(double multiplier, String abbreviation)
      Creates a custom Metric using the given multiplier and abbreviation.
      Parameters:
      multiplier -
      abbreviation - must not be null.
  • Method Details

    • getMultiplier

      public double getMultiplier()
      Description copied from interface: Metric
      Returns the multiplier to calculate metrics values from a base scale.
      Specified by:
      getMultiplier in interface Metric
      Returns:
    • getAbbreviation

      public String getAbbreviation()
      Description copied from interface: Metric
      Returns the scientific abbreviation of the unit the Metric is in.
      Specified by:
      getAbbreviation in interface Metric
      Returns: