public class PropertiesUtility extends Object
Modifier and Type | Method and Description |
---|---|
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")
|
static int |
toEffictiveLength(String aString)
Calculates the effective length ignoring any ANSI escape sequences.
|
static String |
toNormalizedProperty(String aPropertyKey)
Converts a Pascal case or camel case property to an "_" underscore
separated upper case property.
|
static List<org.refcodes.mixin.mixins.AttributeAccessor<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. |
public static List<org.refcodes.mixin.mixins.AttributeAccessor<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.public static String toNormalizedProperty(String aPropertyKey)
aPropertyKey
- The property key to be converted.public static int toEffictiveLength(String aString)
aString
- The String
for which to calculate the effective
(visible) length; ignoring any escape sequences such ANSI escape
codes.Copyright © 2015. All rights reserved.