Class PropertyMetadata
java.lang.Object
org.vaadin.miki.superfields.object.PropertyMetadata
Metadata for a
Property.- Since:
- 2022-09-01
- Author:
- miki
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyMetadata(String name, Class<V> valueType, V value) Constructs aPropertyMetadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()Returns the name of the metadata.getValue()Returns the value of the metadata.Class<?>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.toString()
-
Constructor Details
-
PropertyMetadata
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 Details
-
getName
Returns the name of the metadata.- Returns:
- Name of the metadata.
-
getValueType
Returns the type of value of the metadata.- Returns:
- Type of value.
-
getValue
Returns the value of the metadata. It is of the type returned bygetValueType().- Returns:
- Value of the metadata. Can be
null.
-
hasValueOfType
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)
-
equals
-
hashCode
public int hashCode() -
toString
-