Package org.apache.solr.common

## Class EnumFieldValue

- java.lang.Object
- - org.apache.solr.common.EnumFieldValue

All Implemented Interfaces:
  `Serializable`, `Comparable<EnumFieldValue>`

    public final class EnumFieldValue
    extends Object
    implements Serializable, Comparable<EnumFieldValue>

Represents a Enum field value, which includes integer value (indicating the sort order) and string (displayed) value. Note: this class has a natural ordering that is inconsistent with equals

See Also:
  Serialized Form

### Constructor Summary

Constructors
`EnumFieldValue​(Integer intValue, String stringValue)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo​(EnumFieldValue o)`
`boolean` `equals​(Object obj)`
`int` `hashCode()`
`Integer` `toInt()`
`String` `toString()`

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

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

### Constructor Detail

#### EnumFieldValue

    public EnumFieldValue​(Integer intValue,
                          String stringValue)

### Method Detail

#### 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`
Returns:
  string (displayed) value

#### toInt

    public Integer toInt()

Returns:
  integer value (indicating the sort order)

#### compareTo

    public int compareTo​(EnumFieldValue o)

Specified by:
  `compareTo` in interface `Comparable<EnumFieldValue>`