public class

State

extends Unit
java.lang.Object
   ↳ com.openxc.units.Unit
     ↳ com.openxc.units.State<T extends java.lang.Enum<?>>

Class Overview

A State is a type of Unit with a limited number of acceptable values.

Summary

Public Constructors
State(T value)
Construct an instance of State from the Enum T value.
Public Methods
T enumValue()
Return the value of this State as an Enum.
boolean equals(Object obj)
String getSerializedValue()
String toString()
[Expand]
Inherited Methods
From class com.openxc.units.Unit
From class java.lang.Object

Public Constructors

public State (T value)

Construct an instance of State from the Enum T value.

Parameters
value an instance of the Enum T.

Public Methods

public T enumValue ()

Return the value of this State as an Enum. This is primarily useful for comparison.

Returns
  • this State's base Enum value.

public boolean equals (Object obj)

public String getSerializedValue ()

public String toString ()