public class ItemHint extends Object implements Comparable<ItemHint>
ItemMetadata
. Defines the list of possible values for a
particular item as ItemHint.ValueHint
instances.
The name
of the hint is the name of the related property with one major
exception for map types as both the keys and values of the map can have hints. In such
a case, the hint should be suffixed by ".keys" or ".values" respectively. Creating a
hint for a map using its property name is therefore invalid.
Modifier and Type | Class and Description |
---|---|
static class |
ItemHint.ValueHint
A hint for a value.
|
static class |
ItemHint.ValueProvider
A value provider.
|
Constructor and Description |
---|
ItemHint(String name,
List<ItemHint.ValueHint> values,
List<ItemHint.ValueProvider> providers) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ItemHint other) |
String |
getName() |
List<ItemHint.ValueProvider> |
getProviders() |
List<ItemHint.ValueHint> |
getValues() |
static ItemHint |
newHint(String name,
ItemHint.ValueHint... values) |
String |
toString() |
public ItemHint(String name, List<ItemHint.ValueHint> values, List<ItemHint.ValueProvider> providers)
public String getName()
public List<ItemHint.ValueHint> getValues()
public List<ItemHint.ValueProvider> getProviders()
public int compareTo(ItemHint other)
compareTo
in interface Comparable<ItemHint>
public static ItemHint newHint(String name, ItemHint.ValueHint... values)