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
ConstructorsConstructorDescriptionPropertyData(String name, Class<P> type, boolean readOnly, P defaultValue) Constructs a newPropertyDatainstance tied to the type of the property's value given bytype. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGetter for the initial value if given.getName()Getter for the property name.getType()Getter for the property value class type.inthashCode()booleanChecks if the property is a read-only value.updateReadOnly(boolean readOnly) Creates a copy ofthiswith the newreadOnlyvalue.
-
Constructor Details
-
PropertyData
Constructs a newPropertyDatainstance 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
nullif none given
-
isReadOnly
public boolean isReadOnly()Checks if the property is a read-only value.- Returns:
- is read-only
-
updateReadOnly
Creates a copy ofthiswith the newreadOnlyvalue.- Parameters:
readOnly- newreadOnlyvalue- Returns:
- copy of
this
-
hashCode
public int hashCode() -
equals
-