public abstract class PEnumDescriptor<T extends PEnumValue<T>> extends PDeclaredDescriptor<T>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_FIRST_VALUE |
Constructor and Description |
---|
PEnumDescriptor(String packageName,
String name,
PEnumBuilderFactory<T> provider) |
Modifier and Type | Method and Description |
---|---|
PEnumBuilder<T> |
builder()
Get the builder for the given declared type.
|
boolean |
equals(Object o) |
protected PEnumBuilderFactory<T> |
getFactoryInternal() |
PType |
getType() |
abstract T |
getValueById(int id) |
abstract T |
getValueByName(String name) |
abstract T[] |
getValues() |
int |
hashCode() |
String |
toString() |
getName, getProgramName, getQualifiedName
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getQualifiedName
public static final int DEFAULT_FIRST_VALUE
public PEnumDescriptor(String packageName, String name, PEnumBuilderFactory<T> provider)
public PType getType()
public abstract T[] getValues()
public abstract T getValueById(int id)
id
- Value to look up enum from.public abstract T getValueByName(String name)
name
- Name to look up enum from.public PEnumBuilder<T> builder()
PDeclaredDescriptor
builder
in class PDeclaredDescriptor<T extends PEnumValue<T>>
public String toString()
toString
in class PDeclaredDescriptor<T extends PEnumValue<T>>
protected PEnumBuilderFactory<T> getFactoryInternal()
Copyright © 2015–2017 morimekta.net. All rights reserved.