public class Attributes<T extends AttributeValue> extends Object implements Attribute<T>
Constructor and Description |
---|
Attributes(String _name,
String _description,
boolean _alwaysHasValue,
Class<T> _valueClass,
T _exampleAttributeValue,
DictionaryEntry.AttributeGroup[] _groups) |
Attributes(String _name,
String _description,
DictionaryEntry.AttributeGroup[] _groups) |
Modifier and Type | Method and Description |
---|---|
boolean |
alwaysHasValue()
Returns
true if the attribute must have a value. |
boolean |
appliesTo(DictionaryEntry.AttributeGroup _group)
Test if this attribute type is applicable to an attribute group.
|
boolean |
canHaveValue()
Returns
true if the attribute can have values. |
Class<T> |
getAttributeValueClass()
Returns the class of attribute values this attribute uses.
|
String |
getDescription()
Return a short description explaining the attribute to the user.
|
T |
getExampleValue()
Returns an example value of the type this attribute uses.
|
String |
getName()
Return a short name describing the attribute to the user.
|
String |
toString() |
protected static final ResourceBundle NAMES
public static final Priority EXAMPLE_PRIORITY_VALUE
public static final ReferenceAttributeValue EXAMPLE_REFERENCE_VALUE
public static final Abbreviation EXAMPLE_ABBREVIATION_VALUE
public static final Gairaigo EXAMPLE_GAIRAIGO_VALUE
public static final InformationAttributeValue EXAMPLE_INFORMATION_VALUE
public static final Attribute<PartOfSpeech> PART_OF_SPEECH
public static final Attribute<WithoutValue> EXAMPLE
public static final Attribute<Abbreviation> ABBREVIATION
public static final Attribute<ReferenceAttributeValue> REFERENCE
public static final Attribute<ReferenceAttributeValue> SYNONYM
public static final Attribute<ReferenceAttributeValue> ANTONYM
public static final Attribute<InformationAttributeValue> EXPLANATION
protected String name
protected String description
protected boolean canHaveValue
protected boolean alwaysHasValue
protected Class<T extends AttributeValue> valueClass
protected T extends AttributeValue exampleAttributeValue
protected DictionaryEntry.AttributeGroup[] groups
public Attributes(String _name, String _description, DictionaryEntry.AttributeGroup[] _groups)
public String getName()
Attribute
getName
in interface Attribute<T extends AttributeValue>
public String getDescription()
Attribute
getDescription
in interface Attribute<T extends AttributeValue>
public boolean canHaveValue()
Attribute
true
if the attribute can have values.canHaveValue
in interface Attribute<T extends AttributeValue>
public boolean alwaysHasValue()
Attribute
true
if the attribute must have a value.alwaysHasValue
in interface Attribute<T extends AttributeValue>
public Class<T> getAttributeValueClass()
Attribute
getAttributeValueClass
in interface Attribute<T extends AttributeValue>
public T getExampleValue()
Attribute
getExampleValue
in interface Attribute<T extends AttributeValue>
public boolean appliesTo(DictionaryEntry.AttributeGroup _group)
Attribute
appliesTo
in interface Attribute<T extends AttributeValue>
Copyright © 2001-2013 the JGloss developers. All Rights Reserved.