public class Property<T> extends Object implements PropertySourceChangeListener<T>, VetoablePropertySourceChangeListener<T>, Cloneable
| Modifier and Type | Field and Description |
|---|---|
static String |
ANONYMOUS_SOURCE |
static String |
DEFAULT_SOURCE |
static String |
NON_PRINTABLE_VALUE_STRING |
| Constructor and Description |
|---|
Property(Object id) |
Property(Object id,
PropertySource<T>... sources) |
Property(Object id,
T defaultValue) |
Property(Object id,
T defaultValue,
boolean trimStrings,
PropertySource<T>... sources) |
Property(Object id,
T defaultValue,
PropertySource<T>... sources) |
Property(Property<T> property)
Deep Copy Constructor
|
public static final String ANONYMOUS_SOURCE
public static final String DEFAULT_SOURCE
public static final String NON_PRINTABLE_VALUE_STRING
public Property(Property<T> property)
property - Property to be copied.public Property(Object id)
public Property(Object id, PropertySource<T>... sources)
public Property(Object id, T defaultValue, PropertySource<T>... sources)
public Property(Object id, T defaultValue, boolean trimStrings, PropertySource<T>... sources)
public String getId()
public T getDefaultValue()
public void setDefaultValue(T value)
public void setTrimStrings(boolean trimStrings)
public boolean getTrimStrings()
public void setPrintable(boolean printable)
public boolean isPrintable()
public void addListener(PropertyChangeListener<T> listener)
public void removeListener(PropertyChangeListener<T> listener)
public void addVetoableListener(VetoablePropertySourceChangeListener<T> listener)
public void removeVetoableListener(VetoablePropertySourceChangeListener<T> listener)
public void addSource(PropertySource<T> source)
public void addSources(PropertySource<T>... sources)
public void addAllSources(Collection<PropertySource<T>> sources)
public void initialize()
throws PropertyVetoException,
PropertyConversionException
public Collection<PropertySource<T>> getSources()
public Collection<String> getSourceNames()
public PropertySource<T> getSource(String name)
public void setSourceValue(String name, T value) throws PropertyVetoException
PropertyVetoExceptionpublic boolean isSet()
public T getValue()
public PropertySource<T> getMaster()
public void setValue(T value) throws PropertyVetoException, PropertyConversionException
value, - the valuePropertyVetoException - on errorPropertyConversionException - on errorpublic void setObjectValue(Object value) throws PropertyConversionException, PropertyVetoException
value, - the valuePropertyConversionException - on errorPropertyVetoException - on errorpublic void propertySourceChanged(PropertySourceChangeEvent<T> event)
propertySourceChanged in interface PropertySourceChangeListener<T>public void vetoablePropertySourceChanged(PropertySourceChangeEvent<T> event) throws PropertyVetoException
vetoablePropertySourceChanged in interface VetoablePropertySourceChangeListener<T>PropertyVetoExceptionpublic void setType(Class<?> type)
public Class<?> getParameterizedClass()
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String toKeyValueString()
public String toString(boolean inclID)
Copyright 2004-2021 Solace Corporation. All rights reserved.