Package org.openremote.model.value
Class AbstractNameValueDescriptorHolder<T>
java.lang.Object
org.openremote.model.value.AbstractNameValueDescriptorHolder<T>
- All Implemented Interfaces:
NameHolder
,ValueDescriptorHolder<T>
- Direct Known Subclasses:
AttributeDescriptor
,MetaItemDescriptor
public abstract class AbstractNameValueDescriptorHolder<T>
extends Object
implements ValueDescriptorHolder<T>, NameHolder
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openremote.model.value.NameHolder
NameHolder.NameHolderToStringConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ValueConstraint[]
protected ValueFormat
protected @Pattern(regexp="^\\w+$") String
protected ValueDescriptor
<T> protected String[]
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractNameValueDescriptorHolder
(String name, ValueDescriptor<T> type, ValueConstraint... constraints) AbstractNameValueDescriptorHolder
(String name, ValueDescriptor<T> type, ValueConstraint[] constraints, ValueFormat format, String[] units) -
Method Summary
-
Field Details
-
name
-
type
-
constraints
-
format
-
units
-
-
Constructor Details
-
AbstractNameValueDescriptorHolder
public AbstractNameValueDescriptorHolder(String name, ValueDescriptor<T> type, ValueConstraint... constraints) -
AbstractNameValueDescriptorHolder
public AbstractNameValueDescriptorHolder(String name, ValueDescriptor<T> type, ValueConstraint[] constraints, ValueFormat format, String[] units)
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceNameHolder
-
setName
-
getType
- Specified by:
getType
in interfaceValueDescriptorHolder<T>
-
setType
-
getFormat
- Specified by:
getFormat
in interfaceValueDescriptorHolder<T>
-
getConstraints
- Specified by:
getConstraints
in interfaceValueDescriptorHolder<T>
-
getUnits
- Specified by:
getUnits
in interfaceValueDescriptorHolder<T>
-
hashCode
public int hashCode() -
equals
Descriptor names are unique identifiers so can use this for equality purposes -
toString
-