Package com.ocient.metrics

# Class Metric.NamedTag

java.lang.Object
com.ocient.metrics.Metric.NamedTag

Enclosing class:
  Metric<T>

    public static class Metric.NamedTag
    extends Object

A Tag with a String or Integer identifier

NOTE: Below is a poor man's std::variant / Either implementation

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`boolean` | `equals​(Object obj)` |
`int` | `hashCode()` |
`String` | `id()` |
`static Metric.NamedTag` | `of​(Metric.Tag type, int id)` |
`static Metric.NamedTag` | `of​(Metric.Tag type, String id)` |
`Metric.Tag` | `tag()` |
`String` | `toString()` |

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Method Details

### of

public static Metric.NamedTag of​(Metric.Tag type, String id)

### of

public static Metric.NamedTag of​(Metric.Tag type, int id)

### tag

public Metric.Tag tag()

Returns:
  the `Metric.Tag`

### id

public String id()

Returns:
  the string identifier of this Tag

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals​(Object obj)

Overrides:
  `equals` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`