public class NormalizePropertiesBuilderImpl extends Object implements NormalizePropertiesBuilder
TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty
Constructor and Description |
---|
NormalizePropertiesBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
String[] |
getText()
Retrieves the text from the text property.
|
static boolean |
isAmbiguousProperty(String aTextA,
String aTextB)
Tests whether two texts are equal when flattened (e.g. no Camel case nor
Pascal case any more and no more "_" underscores")
|
void |
setText(String... aText)
Sets the text for the text property.
|
protected static String |
toNormalizedProperty(String aPropertyKey)
Converts a Pascal case or camel case property to an "_" underscore
separated upper case property.
|
static List<org.refcodes.collection.Relation<String,String>> |
toProperties(String aSeparatedValuesProperties,
char aDelimiter)
Similar to
SeparatedValuesUtility#fromSeparatedValues(String, char) with the
difference, that additionally properties with key and value are extracted
from the separated values. |
String |
toString()
The
String being build by the builder upon the settings of the
attributes. |
String[] |
toStrings()
The
String s being build by the builder upon the settings of the
attributes. |
B |
withText(Collection<String> aText)
Sets the text for the text property.
|
B |
withText(String... aText)
Sets the text for the text property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getText
setText, setText
withText
public String[] toStrings()
Text
String
s being build by the builder upon the settings of the
attributes.toStrings
in interface Text<NormalizePropertiesBuilder>
String
arraypublic static List<org.refcodes.collection.Relation<String,String>> toProperties(String aSeparatedValuesProperties, char aDelimiter) throws ParseException
SeparatedValuesUtility#fromSeparatedValues(String, char)
with the
difference, that additionally properties with key and value are extracted
from the separated values. This is useful when parsing portions of URLs.aSeparatedValuesProperties
- The String
containing separated
values with properties.aDelimiter
- The delimiter used for separating the elements if the
single CSV String
.List
with property elements.ParseException
- in case there were problems identifying the
properties.public static boolean isAmbiguousProperty(String aTextA, String aTextB)
aTextA
- The first test to be compared with the second text.aTextB
- The second text to be compared with the first text.protected static String toNormalizedProperty(String aPropertyKey)
aPropertyKey
- The property key to be converted.public String[] getText()
TextAccessor
getText
in interface TextAccessor
public void setText(String... aText)
TextAccessor.TextMutator
setText
in interface TextAccessor.TextMutator
aText
- The text to be stored by the text property.public B withText(String... aText)
TextAccessor.TextBuilder
public B withText(Collection<String> aText)
TextAccessor.TextBuilder
withText
in interface TextAccessor.TextBuilder<Text<B extends Text<B>>>
aText
- The text to be stored by the text property.public String toString()
Copyright © 2016. All rights reserved.