T - Object type.P - Property type.public class Property<T,P> extends Object
| Constructor and Description |
|---|
Property(Class<T> owner,
String name,
Class<P> type,
com.vaadin.flow.function.SerializableBiConsumer<T,P> setter,
com.vaadin.flow.function.SerializableFunction<T,P> getter,
Collection<PropertyMetadata> metadata)
Constructs a
Property of a given that belongs to the given owner, has a given value type, a corresponding setter and getter and optional PropertyMetadata. |
Property(Class<T> owner,
String name,
Class<P> type,
com.vaadin.flow.function.SerializableBiConsumer<T,P> setter,
com.vaadin.flow.function.SerializableFunction<T,P> getter,
PropertyMetadata... metadata)
Constructs a
Property of a given that belongs to the given owner, has a given value type, a corresponding setter and getter and optional PropertyMetadata. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Optional<com.vaadin.flow.function.SerializableFunction<T,P>> |
getGetter()
Returns the getter for the property, if any.
|
Map<String,PropertyMetadata> |
getMetadata()
Returns the map of
PropertyMetadata, organised by metadata name for easier use. |
String |
getName()
Returns the name of this property.
|
Class<T> |
getOwner()
Returns the type the property belongs to.
|
Optional<com.vaadin.flow.function.SerializableBiConsumer<T,P>> |
getSetter()
Returns the setter for the property, if any.
|
Class<P> |
getType()
Returns the value type of the property.
|
int |
hashCode() |
String |
toString() |
public Property(Class<T> owner, String name, Class<P> type, com.vaadin.flow.function.SerializableBiConsumer<T,P> setter, com.vaadin.flow.function.SerializableFunction<T,P> getter, PropertyMetadata... metadata)
Property of a given that belongs to the given owner, has a given value type, a corresponding setter and getter and optional PropertyMetadata.owner - Object the property belongs to.name - Name of the property.type - Type of the property.setter - Setter. May be null.getter - Getter. May be null.metadata - Any PropertyMetadata this Property should have.public Property(Class<T> owner, String name, Class<P> type, com.vaadin.flow.function.SerializableBiConsumer<T,P> setter, com.vaadin.flow.function.SerializableFunction<T,P> getter, Collection<PropertyMetadata> metadata)
Property of a given that belongs to the given owner, has a given value type, a corresponding setter and getter and optional PropertyMetadata.owner - Object the property belongs to.name - Name of the property.type - Type of the property.setter - Setter. May be null.getter - Getter. May be null.metadata - Any PropertyMetadata this Property should have.public String getName()
public Optional<com.vaadin.flow.function.SerializableBiConsumer<T,P>> getSetter()
public Optional<com.vaadin.flow.function.SerializableFunction<T,P>> getGetter()
public Map<String,PropertyMetadata> getMetadata()
PropertyMetadata, organised by metadata name for easier use.null, but possibly empty, map of PropertyMetadata by name. Any changes to the returned map will affect this object.Copyright © 2024 Miki. All rights reserved.