ExpandableStringEnum<T> Class
- java.
lang. Object - com.
azure. core. util. ExpandableStringEnum<T>
- com.
Type Parameters
- T
a specific expandable enum type
Implements
public abstract class ExpandableStringEnum
implements ExpandableEnum<String>
Base implementation for expandable, single string enums.
Constructor Summary
Constructor | Description |
---|---|
ExpandableStringEnum() |
Deprecated
Use the fromString(String name, Class<T> clazz) factory method.
Creates a new instance of ExpandableStringEnum<T> without a toString() value. |
Method Summary
Modifier and Type | Method and Description |
---|---|
protected static T |
fromString(String name, Class<T> clazz)
Creates an instance of the specific expandable string enum from a String. |
protected static Collection<T> |
values(Class<T> clazz)
Gets a collection of all known values to an expandable string enum type. |
boolean | equals(Object obj) |
String |
getValue()
Returns the value represented by this expandable enum instance. |
int | hashCode() |
String | toString() |
Methods inherited from java.lang.Object
Constructor Details
ExpandableStringEnum
@Deprecated
public ExpandableStringEnum()
Deprecated
Creates a new instance of ExpandableStringEnum<T> without a toString() value.
This constructor shouldn't be called as it will produce a ExpandableStringEnum<T> which doesn't have a String enum value.
Method Details
fromString
protected static T
Creates an instance of the specific expandable string enum from a String.
Parameters:
Returns:
values
protected static Collection
Gets a collection of all known values to an expandable string enum type.
Parameters:
Returns:
clazz
.equals
public boolean equals(Object obj)
Overrides:
ExpandableStringEnum<T>.equals(Object obj)Parameters:
getValue
public String getValue()
Returns the value represented by this expandable enum instance.
hashCode
public int hashCode()
Overrides:
ExpandableStringEnum<T>.hashCode()toString
public String toString()
Overrides:
ExpandableStringEnum<T>.toString()