com.vaadin.flow.server.webcomponent.
Class PropertyData<P extends Serializable>
Type Parameters:
P
- type of the property's value
All Implemented Interfaces:
Value object containing information of a web component's property field.
Since:
2.0
Author:
Vaadin Ltd.
See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyData
(String name, Class<P> type, boolean readOnly, P defaultValue) Constructs a new
PropertyData
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 of
this
with the newreadOnly
value.
-
Constructor Details
-
PropertyData
Constructs a new
PropertyData
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 of
this
with the newreadOnly
value.Parameters:
readOnly
- newreadOnly
valueReturns:
copy of
this
-
hashCode
public int hashCode() -
equals
-