Class PropertyData<P extends Serializable>
java.lang.Object
com.vaadin.flow.server.webcomponent.PropertyData<P>
- Type Parameters:
P
- type of the property's value
- All Implemented Interfaces:
Serializable
Value object containing information of a web component's property field.
- Since:
- 2.0
- Author:
- Vaadin Ltd.
- See Also:
-
Constructor Summary
ConstructorDescriptionPropertyData
(String name, Class<P> type, boolean readOnly, P defaultValue) Constructs a newPropertyData
instance tied to the type of the property's value given bytype
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Getter for the initial value if given.getName()
Getter for the property name.getType()
Getter for the property value class type.int
hashCode()
boolean
Checks if the property is a read-only value.updateReadOnly
(boolean readOnly) Creates a copy ofthis
with the newreadOnly
value.
-
Constructor Details
-
PropertyData
Constructs a newPropertyData
instance tied to the type of the property's value given bytype
.- Parameters:
name
- name of the propertytype
- type of the property valuereadOnly
- is the property read-only (on the client-side)defaultValue
- default value for the property
-
-
Method Details
-
getName
Getter for the property name.- Returns:
- property name
-
getType
Getter for the property value class type.- Returns:
- value class type
-
getDefaultValue
Getter for the initial value if given.- Returns:
- initial value or
null
if none given
-
isReadOnly
public boolean isReadOnly()Checks if the property is a read-only value.- Returns:
- is read-only
-
updateReadOnly
Creates a copy ofthis
with the newreadOnly
value.- Parameters:
readOnly
- newreadOnly
value- Returns:
- copy of
this
-
hashCode
public int hashCode() -
equals
-