Class PropertyMetadata
- java.lang.Object
-
- org.vaadin.miki.superfields.object.PropertyMetadata
-
-
Constructor Summary
Constructors Constructor Description PropertyMetadata(String name, Class<V> valueType, V value)Constructs aPropertyMetadata.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetName()Returns the name of the metadata.ObjectgetValue()Returns the value of the metadata.Class<?>getValueType()Returns the type of value of the metadata.inthashCode()booleanhasValueOfType(Class<?> type)Checks if the value of the metadata is an instance of the given type.StringtoString()
-
-
-
Constructor Detail
-
PropertyMetadata
public PropertyMetadata(String name, Class<V> valueType, V value)
Constructs aPropertyMetadata.- Type Parameters:
V- Type of value.- Parameters:
name- Name of the metadata.valueType- Type of value of the metadata.value- Value of the metadata.
-
-
Method Detail
-
getName
public String getName()
Returns the name of the metadata.- Returns:
- Name of the metadata.
-
getValueType
public Class<?> getValueType()
Returns the type of value of the metadata.- Returns:
- Type of value.
-
getValue
public Object getValue()
Returns the value of the metadata. It is of the type returned bygetValueType().- Returns:
- Value of the metadata. Can be
null.
-
hasValueOfType
public boolean hasValueOfType(Class<?> type)
Checks if the value of the metadata is an instance of the given type.- Parameters:
type- Type to check.- Returns:
- Same as
type.isInstance(this.getValue)
-
-