Package com.azure.core.util
Class ExpandableStringEnum<T extends ExpandableStringEnum<T>>
- java.lang.Object
-
- com.azure.core.util.ExpandableStringEnum<T>
-
- Type Parameters:
T- a specific expandable enum type
- Direct Known Subclasses:
CloudEventDataFormat,GeoObjectType,LongRunningOperationStatus
public abstract class ExpandableStringEnum<T extends ExpandableStringEnum<T>> extends Object
Base implementation for expandable, single string enums.
-
-
Constructor Summary
Constructors Constructor Description ExpandableStringEnum()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)protected static <T extends ExpandableStringEnum<T>>
TfromString(String name, Class<T> clazz)Creates an instance of the specific expandable string enum from a String.inthashCode()StringtoString()protected static <T extends ExpandableStringEnum<T>>
Collection<T>values(Class<T> clazz)Gets a collection of all known values to an expandable string enum type.
-
-
-
Method Detail
-
fromString
protected static <T extends ExpandableStringEnum<T>> T fromString(String name, Class<T> clazz)
Creates an instance of the specific expandable string enum from a String.- Type Parameters:
T- the class of the expandable string enum.- Parameters:
name- The value to create the instance from.clazz- The class of the expandable string enum.- Returns:
- The expandable string enum instance.
-
values
protected static <T extends ExpandableStringEnum<T>> Collection<T> values(Class<T> clazz)
Gets a collection of all known values to an expandable string enum type.- Type Parameters:
T- the class of the expandable string enum.- Parameters:
clazz- the class of the expandable string enum.- Returns:
- A collection of all known values for the given
clazz.
-
-