org.springframework.batch.core.jsr

## Class SimpleMetric

- java.lang.Object
- - org.springframework.batch.core.jsr.SimpleMetric

- All Implemented Interfaces:
    javax.batch.runtime.Metric

      public class SimpleMetric
      extends java.lang.Object
      implements javax.batch.runtime.Metric

  Simple implementation of the `Metric` interface as required by JSR-352.
  Since:
    3.0
  Author:
    Michael Minella

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface javax.batch.runtime.Metric

      `javax.batch.runtime.Metric.MetricType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleMetric(javax.batch.runtime.Metric.MetricType type, long value)` Basic constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.batch.runtime.Metric.MetricType` | `getType()`
    `long` | `getValue()`

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

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

- - ### Constructor Detail

    - #### SimpleMetric

          public SimpleMetric(javax.batch.runtime.Metric.MetricType type,
                              long value)

      Basic constructor. The attributes are immutable so this class is thread-safe.
      Parameters:
        `type` - as defined by JSR-352
        `value` - the count of the times the related type has occurred.

  - ### Method Detail

    - #### getType

          public javax.batch.runtime.Metric.MetricType getType()

      Specified by:
        `getType` in interface `javax.batch.runtime.Metric`

    - #### getValue

          public long getValue()

      Specified by:
        `getValue` in interface `javax.batch.runtime.Metric`