public class StringListProperty extends StringProperty
StringProperty that stores a list of String values that are enclosed with
pipe-symbols.AbstractProperty.PropertyBuilder<T extends AbstractProperty<? extends V>>| Modifier and Type | Field and Description |
|---|---|
private static char |
DEFAULT_CSV_SEPARATOR |
private static String |
DEFAULT_CSV_SEPARATOR_STRING |
private static char |
SEPARATOR |
private static String |
SEPARATOR_PATTERN |
TYPEPROPERTY_TYPENO_PROPERTIES| Constructor and Description |
|---|
StringListProperty(String name,
Bean bean)
The constructor.
|
StringListProperty(String name,
Bean bean,
AbstractValidator<? super String> validator)
The constructor.
|
StringListProperty(String name,
Bean bean,
Supplier<String> expression)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(String element,
boolean distinct) |
private List<String> |
asList() |
boolean |
contains(String element) |
protected boolean |
doSetValue(String newValue)
Called from
AbstractValueProperty.setValue(Object). |
String |
getValueAsCsv() |
String |
getValueAsCsv(String separator) |
List<String> |
getValueAsList() |
Set<String> |
getValueAsSet() |
boolean |
remove(String element) |
void |
setValueAsCollection(Collection<String> list) |
void |
setValueAsCsv(String csv) |
void |
setValueAsCsv(String csv,
char separator) |
void |
setValueAsCsv(String csv,
char separator,
boolean trim) |
protected void |
toJson(javax.json.stream.JsonGenerator json,
String stringValue) |
private String |
wrap(String value) |
doGetValue, fromJson, withValdidatoraddListener, addListener, fireValueChangedEvent, removeListener, removeListenerbind, bindBidirectional, clearValidationResult, copy, equals, getReadOnly, getValue, hashCode, invalidated, isBound, isReadOnly, isValid, markInvalid, requireWritable, setValue, unbind, unbindBidirectional, validateassignValueFrom, clone, copy, copy, copy, copy, copy, getBean, getJsonUtil, getName, getValidator, isMandatory, toJson, toString, withValdidatorfinalize, getClass, notify, notifyAll, wait, wait, waitget, getValueSafe, length, setconcat, getType, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, isEmpty, isEqualTo, isEqualTo, isEqualToIgnoreCase, isEqualToIgnoreCase, isNotEmpty, isNotEqualTo, isNotEqualTo, isNotEqualToIgnoreCase, isNotEqualToIgnoreCase, isNotNull, isNull, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualToisEqualTo, isNotEqualTogetBean, getNameaddListener, getValue, removeListenergetValuetoJsongetReadOnly, getReadOnly, isMandatory, isReadOnly, isValid, validatebind, bindBidirectional, isBound, unbind, unbindBidirectionalsetValueprivate static final char SEPARATOR
private static final String SEPARATOR_PATTERN
private static final char DEFAULT_CSV_SEPARATOR
private static final String DEFAULT_CSV_SEPARATOR_STRING
public StringListProperty(String name, Bean bean)
name - - see AbstractProperty.getName().bean - - see AbstractProperty.getBean().public StringListProperty(String name, Bean bean, AbstractValidator<? super String> validator)
name - - see AbstractProperty.getName().bean - - see AbstractProperty.getBean().validator - - see AbstractValueProperty.validate().public StringListProperty(String name, Bean bean, Supplier<String> expression)
name - - see AbstractProperty.getName().bean - - see AbstractProperty.getBean().expression - the Supplier providing the actual value.protected boolean doSetValue(String newValue)
AbstractValuePropertyAbstractValueProperty.setValue(Object).doSetValue in class StringPropertynewValue - the new value to set.true if the value has changed, false otherwise.public boolean remove(String element)
element - the element to remove from the value as list.true if the given element was previously present and is now removed so the value actually has
changed, false otherwise (if not present and no change).List.remove(Object)public boolean add(String element, boolean distinct)
element - the element to add to the value as list.distinct - true if the value should be treated as Set and this method should not change the
value if the given element is already present,
false otherwise.true if the value has changed, false otherwise (if distinct was
true and the given element was already present).List.add(Object)public boolean contains(String element)
element - the element to check.true if the given element is contained in the value as list.List.contains(Object)public void setValueAsCollection(Collection<String> list)
list - the List of elements to set as separated string value.public String getValueAsCsv(String separator)
separator - the character used as separator.value with elements separated by the given separator.public void setValueAsCsv(String csv)
csv - the new value as comma separated value (e.g. "a,b,c").public void setValueAsCsv(String csv, char separator)
csv - the new value with elements separated by the given separator.separator - the character used as separator.public void setValueAsCsv(String csv, char separator, boolean trim)
protected void toJson(javax.json.stream.JsonGenerator json,
String stringValue)
toJson in class StringPropertyjson - the JsonGenerator.stringValue - the value.AbstractProperty.toJson(JsonGenerator)Copyright © 2001–2016 mmm-Team. All rights reserved.