org.springframework.data.geo

## 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 `Metric`s on the fly.

Since:
  1.8
Author:
  Oliver Gierke, Thomas Darimont
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CustomMetric(double multiplier)` Creates a custom `Metric` using the given multiplier.
`CustomMetric(double multiplier, String abbreviation)` Creates a custom `Metric` using the given multiplier and abbreviation.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getAbbreviation()` Returns the scientific abbreviation of the unit the `Metric` is in.
`double` `getMultiplier()` Returns the multiplier to calculate metrics values from a base scale.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### 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 Detail

#### 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: