Top Description Fields Constructors Methods
com.univocity.parsers.common

public final Class NormalizedString

extends Object
implements Serializable, Comparable<NormalizedString>, CharSequence
Class Inheritance
All Implemented Interfaces
java.lang.CharSequence, java.lang.Comparable, java.io.Serializable
Imports
java.io.*, java.util.*

A NormalizedString allows representing text in a normalized fashion. Strings with different character case or surrounding whitespace are considered the same. Used to represent groups of fields, where users may refer to their names using different character cases or whitespaces. Where the character case or the surrounding space is relevant, the NormalizedString will have its isLiteral() method return true, meaning the exact character case and surrounding whitespaces are required for matching it. Invoking valueOf(String) with a String surrounded by single quotes will create a literal NormalizedString. Use literalValueOf(String) to obtain the same NormalizedString without having to introduce single quotes.

Field Summary

Modifier and TypeField and Description
private final int
private final boolean
private final String
private final String
private static final long
private static final StringCache<NormalizedString>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public char
charAt(int
the index of the char value to be returned
index
)

Implements java.lang.CharSequence.charAt.

Returns the char value at the specified index.
public int
compareTo(NormalizedString
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
public int

Returns:

the result of String#compareTo(String). If this NormalizedString is a literal, the original argument string will be compared. If this NormalizedString is not a literal, the result will be from the comparison of the normalized content of both strings (i.e. surrounding whitespaces and character case differences will be ignored).
compareTo
(String
a plain String
o
)

Implements java.lang.Comparable.compareTo.

Compares a NormalizedString against a String lexicographically.
public boolean
equals(Object
the reference object with which to compare.
anObject
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public static StringCache<NormalizedString>

Returns:

the string cache used to store NormalizedString instances associated with their original String.
getCache
()

Returns the internal string cache to allow users to tweak its size limit or clear it when appropriate

private static <T extends Collection<NormalizedString>> T
getCollection(T out, String... args)

private static <T extends Collection<NormalizedString>> T
private static <T extends Collection<String>> T
private static <T extends Collection<String>> T
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
public static boolean

Returns:

true if any entry has been modified to be a literal, otherwise false
identifyLiterals
(NormalizedString[]
a group of identifiers that may contain ambiguous entries if their character case or surrounding whitespaces is not considered. This array will be modified.
strings
)

Analyzes a group of NormalizedString to identify any instances whose normalized content will generate clashes.

public static boolean

Returns:

true if any entry has been modified to be a literal, otherwise false
identifyLiterals
(NormalizedString[]
a group of identifiers that may contain ambiguous entries if their character case or surrounding whitespaces is not considered. This array will be modified.
strings
,
boolean
flag indicating that identifiers are stored in lower case (for compatibility with databases). If a string has a uppercase character, it means it must become a literal.
lowercaseIdentifiers
,
boolean
flag indicating that identifiers are stored in upper case (for compatibility with databases). If a string has a lowercase character, it means it must become a literal.
uppercaseIdentifiers
)

Analyzes a group of NormalizedString to identify any instances whose normalized content will generate clashes.

public boolean
public int
length()

Implements java.lang.CharSequence.length.

Returns the length of this character sequence.
public static NormalizedString

Returns:

the literal NormalizedString version of the given string.
literalValueOf
(String
the input String
string
)

Creates a literal NormalizedString, meaning it will only match with other String or NormalizedString if they have the exact same content including character case and surrounding whitespaces.

private String
private static boolean
shouldBeLiteral(String string, boolean lowercaseIdentifiers, boolean uppercaseIdentifiers)

public CharSequence
subSequence(int
the start index, inclusive
start
,
int
the end index, exclusive
end
)

Implements java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence.
public static NormalizedString[]

Returns:

the NormalizedString representations of all input strings.
toArray
(Collection<String>
the strings to convert to NormalizedString
args
)

Converts a collection of plain strings into an array of NormalizedString

public static NormalizedString[]

Returns:

the NormalizedString representations of all input strings.
toArray
(String...
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into an array of NormalizedString.

public static String[]

Returns:

the String representations of all input strings.
toArray
(NormalizedString...
the normalized strings to convert to String
args
)

Converts multiple normalized strings into an array of String.

public static ArrayList<NormalizedString>

Returns:

the NormalizedString representations of all input strings.
toArrayList
(String...
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into an ArrayList of NormalizedString.

public static ArrayList<NormalizedString>

Returns:

the NormalizedString representations of all input strings.
toArrayList
(Collection<String>
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into an ArrayList of NormalizedString.

public static ArrayList<String>

Returns:

the original Strings of all input normalized strings.
toArrayListOfStrings
(NormalizedString...
the normalized strings to convert to String
args
)

Converts multiple normalized strings into a HashSet of String.

public static ArrayList<String>

Returns:

the original Strings of all input normalized strings.
toArrayListOfStrings
(Collection<NormalizedString>
the normalized strings to convert to String
args
)

Converts multiple normalized strings into a HashSet of String.

public static HashSet<NormalizedString>

Returns:

the NormalizedString representations of all input strings.
toHashSet
(String...
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into a HashSet of NormalizedString.

public static HashSet<NormalizedString>

Returns:

the NormalizedString representations of all input strings.
toHashSet
(Collection<String>
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into a HashSet of NormalizedString.

public static HashSet<String>

Returns:

the original Strings of all input normalized strings.
toHashSetOfStrings
(NormalizedString...
the normalized strings to convert to String
args
)

Converts multiple normalized strings into a HashSet of String.

public static HashSet<String>

Returns:

the original Strings of all input normalized strings.
toHashSetOfStrings
(Collection<NormalizedString>
the normalized strings to convert to String
args
)

Converts multiple normalized strings into a HashSet of String.

public static NormalizedString[]

Returns:

the input string array, with NormalizedString literals in the positions where clashes would originally occur.
toIdentifierGroupArray
(NormalizedString[]
a group of identifiers that may contain ambiguous entries if their character case or surrounding whitespaces is not considered. This array will be modified.
strings
)

Analyzes a group of NormalizedString to identify any instances whose normalized content will generate clashes.

public static NormalizedString[]

Returns:

a NormalizedString array with literals in the positions where clashes would originally occur.
toIdentifierGroupArray
(String[]
a group of identifiers that may contain ambiguous entries if their character case or surrounding whitespaces is not considered.
strings
)

Analyzes a group of String to identify any instances whose normalized content will generate clashes.

public static LinkedHashSet<NormalizedString>

Returns:

the NormalizedString representations of all input strings.
toLinkedHashSet
(String...
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into a LinkedHashSet of NormalizedString.

public static LinkedHashSet<NormalizedString>

Returns:

the NormalizedString representations of all input strings.
toLinkedHashSet
(Collection<String>
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into a LinkedHashSet of NormalizedString.

public static LinkedHashSet<String>

Returns:

the original Strings of all input normalized strings.
toLinkedHashSetOfStrings
(NormalizedString...
the normalized strings to convert to String
args
)

Converts multiple normalized strings into a LinkedHashSet of String.

public static LinkedHashSet<String>

Returns:

the original Strings of all input normalized strings.
toLinkedHashSetOfStrings
(Collection<NormalizedString>
the normalized strings to convert to String
args
)

Converts multiple normalized strings into a LinkedHashSet of String.

public NormalizedString

Returns:

the literal representation of the current NormalizedString
toLiteral
()

Returns the literal representation of this NormalizedString, meaning it will only match with other String or NormalizedString if they have the exact same content including character case and surrounding whitespaces.

public String
toString()

Overrides java.lang.Object.toString.

Implements java.lang.CharSequence.toString.

Returns a string containing the characters in this sequence in the same order as this sequence.
public static String[]

Returns:

the String representations of all normalized strings.
toStringArray
(Collection<NormalizedString>
the normalized strings to convert back to to String
args
)

Converts a collection of normalized strings into an array of String

public static TreeSet<NormalizedString>

Returns:

the NormalizedString representations of all input strings.
toTreeSet
(String...
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into a TreeSet of NormalizedString.

public static TreeSet<NormalizedString>

Returns:

the NormalizedString representations of all input strings.
toTreeSet
(Collection<String>
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into a TreeSet of NormalizedString.

public static TreeSet<String>

Returns:

the original Strings of all input normalized strings.
toTreeSetOfStrings
(NormalizedString...
the normalized strings to convert to String
args
)

Converts multiple normalized strings into a HashSet of String.

public static TreeSet<String>

Returns:

the original Strings of all input normalized strings.
toTreeSetOfStrings
(Collection<NormalizedString>
the normalized strings to convert to String
args
)

Converts multiple normalized strings into a HashSet of String.

public static NormalizedString[]

Returns:

the NormalizedString representations of all input strings.
toUniqueArray
(String...
the strings to convert to NormalizedString
args
)

Converts multiple plain strings into an array of NormalizedString, ensuring no duplicate NormalizedString elements exist, even if their original Strings are different.

public static NormalizedString

Returns:

the NormalizedString of the given object.
valueOf
(Object
the input object whose String representation will be used
o
)

Creates a non-literal NormalizedString, meaning it will match with other String or NormalizedString regardless of different including character case and surrounding whitespaces.

public static NormalizedString

Returns:

the NormalizedString of the given string.
valueOf
(String
the input string
string
)

Creates a non-literal NormalizedString, meaning it will match with other String or NormalizedString regardless of different including character case and surrounding whitespaces.

public static String

Returns:

the original string used to create the given normalized representation.
valueOf
(NormalizedString
the normalized string
string
)

Converts a NormalizedString back to its original String representation

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

hashCodeback to summary
private final int hashCode
literalback to summary
private final boolean literal
normalizedback to summary
private final String normalized
originalback to summary
private final String original
serialVersionUIDback to summary
private static final long serialVersionUID
stringCacheback to summary
private static final StringCache<NormalizedString> stringCache

Constructor Detail

NormalizedStringback to summary
private NormalizedString(String string)

Method Detail

charAtback to summary
public char charAt(int index)

Implements java.lang.CharSequence.charAt.

Doc from java.lang.CharSequence.charAt.

Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Parameters
index:int

the index of the char value to be returned

Returns:char

the specified char value

Annotations
@Override
compareToback to summary
public int compareTo(NormalizedString o)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
o:NormalizedString

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
compareToback to summary
public int compareTo(String o)

Implements java.lang.Comparable.compareTo.

Compares a NormalizedString against a String lexicographically.

Parameters
o:String

a plain String

Returns:int

the result of String#compareTo(String). If this NormalizedString is a literal, the original argument string will be compared. If this NormalizedString is not a literal, the result will be from the comparison of the normalized content of both strings (i.e. surrounding whitespaces and character case differences will be ignored).

equalsback to summary
public boolean equals(Object anObject)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
anObject:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getCacheback to summary
public static StringCache<NormalizedString> getCache()

Returns the internal string cache to allow users to tweak its size limit or clear it when appropriate

Returns:StringCache<NormalizedString>

the string cache used to store NormalizedString instances associated with their original String.

getCollectionback to summary
private static <T extends Collection<NormalizedString>> T getCollection(T out, String... args)
getCollectionback to summary
private static <T extends Collection<NormalizedString>> T getCollection(T out, Collection<String> args)
getCollectionback to summary
private static <T extends Collection<String>> T getCollection(T out, NormalizedString... args)
getStringCollectionback to summary
private static <T extends Collection<String>> T getStringCollection(T out, Collection<NormalizedString> args)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
identifyLiteralsback to summary
public static boolean identifyLiterals(NormalizedString[] strings)

Analyzes a group of NormalizedString to identify any instances whose normalized content will generate clashes. Any clashing entries will be converted to their literal counterparts (using toLiteral()), making it possible to identify one from the other.

Parameters
strings:NormalizedString[]

a group of identifiers that may contain ambiguous entries if their character case or surrounding whitespaces is not considered. This array will be modified.

Returns:boolean

true if any entry has been modified to be a literal, otherwise false

identifyLiteralsback to summary
public static boolean identifyLiterals(NormalizedString[] strings, boolean lowercaseIdentifiers, boolean uppercaseIdentifiers)

Analyzes a group of NormalizedString to identify any instances whose normalized content will generate clashes. Any clashing entries will be converted to their literal counterparts (using toLiteral()), making it possible to identify one from the other.

Parameters
strings:NormalizedString[]

a group of identifiers that may contain ambiguous entries if their character case or surrounding whitespaces is not considered. This array will be modified.

lowercaseIdentifiers:boolean

flag indicating that identifiers are stored in lower case (for compatibility with databases). If a string has a uppercase character, it means it must become a literal.

uppercaseIdentifiers:boolean

flag indicating that identifiers are stored in upper case (for compatibility with databases). If a string has a lowercase character, it means it must become a literal.

Returns:boolean

true if any entry has been modified to be a literal, otherwise false

isLiteralback to summary
public boolean isLiteral()
lengthback to summary
public int length()

Implements java.lang.CharSequence.length.

Doc from java.lang.CharSequence.length.

Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Returns:int

the number of chars in this sequence

Annotations
@Override
literalValueOfback to summary
public static NormalizedString literalValueOf(String string)

Creates a literal NormalizedString, meaning it will only match with other String or NormalizedString if they have the exact same content including character case and surrounding whitespaces.

Parameters
string:String

the input String

Returns:NormalizedString

the literal NormalizedString version of the given string.

normalizeback to summary
private String normalize(Object value)
shouldBeLiteralback to summary
private static boolean shouldBeLiteral(String string, boolean lowercaseIdentifiers, boolean uppercaseIdentifiers)
subSequenceback to summary
public CharSequence subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Doc from java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.

Parameters
start:int

the start index, inclusive

end:int

the end index, exclusive

Returns:CharSequence

the specified subsequence

Annotations
@Override
toArrayback to summary
public static NormalizedString[] toArray(Collection<String> args)

Converts a collection of plain strings into an array of NormalizedString

Parameters
args:Collection<String>

the strings to convert to NormalizedString

Returns:NormalizedString[]

the NormalizedString representations of all input strings.

toArrayback to summary
public static NormalizedString[] toArray(String... args)

Converts multiple plain strings into an array of NormalizedString.

Parameters
args:String[]

the strings to convert to NormalizedString

Returns:NormalizedString[]

the NormalizedString representations of all input strings.

toArrayback to summary
public static String[] toArray(NormalizedString... args)

Converts multiple normalized strings into an array of String.

Parameters
args:NormalizedString[]

the normalized strings to convert to String

Returns:String[]

the String representations of all input strings.

toArrayListback to summary
public static ArrayList<NormalizedString> toArrayList(String... args)

Converts multiple plain strings into an ArrayList of NormalizedString.

Parameters
args:String[]

the strings to convert to NormalizedString

Returns:ArrayList<NormalizedString>

the NormalizedString representations of all input strings.

toArrayListback to summary
public static ArrayList<NormalizedString> toArrayList(Collection<String> args)

Converts multiple plain strings into an ArrayList of NormalizedString.

Parameters
args:Collection<String>

the strings to convert to NormalizedString

Returns:ArrayList<NormalizedString>

the NormalizedString representations of all input strings.

toArrayListOfStringsback to summary
public static ArrayList<String> toArrayListOfStrings(NormalizedString... args)

Converts multiple normalized strings into a HashSet of String.

Parameters
args:NormalizedString[]

the normalized strings to convert to String

Returns:ArrayList<String>

the original Strings of all input normalized strings.

toArrayListOfStringsback to summary
public static ArrayList<String> toArrayListOfStrings(Collection<NormalizedString> args)

Converts multiple normalized strings into a HashSet of String.

Parameters
args:Collection<NormalizedString>

the normalized strings to convert to String

Returns:ArrayList<String>

the original Strings of all input normalized strings.

toHashSetback to summary
public static HashSet<NormalizedString> toHashSet(String... args)

Converts multiple plain strings into a HashSet of NormalizedString.

Parameters
args:String[]

the strings to convert to NormalizedString

Returns:HashSet<NormalizedString>

the NormalizedString representations of all input strings.

toHashSetback to summary
public static HashSet<NormalizedString> toHashSet(Collection<String> args)

Converts multiple plain strings into a HashSet of NormalizedString.

Parameters
args:Collection<String>

the strings to convert to NormalizedString

Returns:HashSet<NormalizedString>

the NormalizedString representations of all input strings.

toHashSetOfStringsback to summary
public static HashSet<String> toHashSetOfStrings(NormalizedString... args)

Converts multiple normalized strings into a HashSet of String.

Parameters
args:NormalizedString[]

the normalized strings to convert to String

Returns:HashSet<String>

the original Strings of all input normalized strings.

toHashSetOfStringsback to summary
public static HashSet<String> toHashSetOfStrings(Collection<NormalizedString> args)

Converts multiple normalized strings into a HashSet of String.

Parameters
args:Collection<NormalizedString>

the normalized strings to convert to String

Returns:HashSet<String>

the original Strings of all input normalized strings.

toIdentifierGroupArrayback to summary
public static NormalizedString[] toIdentifierGroupArray(NormalizedString[] strings)

Analyzes a group of NormalizedString to identify any instances whose normalized content will generate clashes. Any clashing entries will be converted to their literal counterparts (using toLiteral()), making it possible to identify one from the other.

Parameters
strings:NormalizedString[]

a group of identifiers that may contain ambiguous entries if their character case or surrounding whitespaces is not considered. This array will be modified.

Returns:NormalizedString[]

the input string array, with NormalizedString literals in the positions where clashes would originally occur.

toIdentifierGroupArrayback to summary
public static NormalizedString[] toIdentifierGroupArray(String[] strings)

Analyzes a group of String to identify any instances whose normalized content will generate clashes. Any clashing entries will be converted to their literal counterparts (using toLiteral()), making it possible to identify one from the other.

Parameters
strings:String[]

a group of identifiers that may contain ambiguous entries if their character case or surrounding whitespaces is not considered.

Returns:NormalizedString[]

a NormalizedString array with literals in the positions where clashes would originally occur.

toLinkedHashSetback to summary
public static LinkedHashSet<NormalizedString> toLinkedHashSet(String... args)

Converts multiple plain strings into a LinkedHashSet of NormalizedString.

Parameters
args:String[]

the strings to convert to NormalizedString

Returns:LinkedHashSet<NormalizedString>

the NormalizedString representations of all input strings.

toLinkedHashSetback to summary
public static LinkedHashSet<NormalizedString> toLinkedHashSet(Collection<String> args)

Converts multiple plain strings into a LinkedHashSet of NormalizedString.

Parameters
args:Collection<String>

the strings to convert to NormalizedString

Returns:LinkedHashSet<NormalizedString>

the NormalizedString representations of all input strings.

toLinkedHashSetOfStringsback to summary
public static LinkedHashSet<String> toLinkedHashSetOfStrings(NormalizedString... args)

Converts multiple normalized strings into a LinkedHashSet of String.

Parameters
args:NormalizedString[]

the normalized strings to convert to String

Returns:LinkedHashSet<String>

the original Strings of all input normalized strings.

toLinkedHashSetOfStringsback to summary
public static LinkedHashSet<String> toLinkedHashSetOfStrings(Collection<NormalizedString> args)

Converts multiple normalized strings into a LinkedHashSet of String.

Parameters
args:Collection<NormalizedString>

the normalized strings to convert to String

Returns:LinkedHashSet<String>

the original Strings of all input normalized strings.

toLiteralback to summary
public NormalizedString toLiteral()

Returns the literal representation of this NormalizedString, meaning it will only match with other String or NormalizedString if they have the exact same content including character case and surrounding whitespaces.

Returns:NormalizedString

the literal representation of the current NormalizedString

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements java.lang.CharSequence.toString.

Doc from java.lang.CharSequence.toString.

Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence.

Returns:String

a string consisting of exactly this sequence of characters

Annotations
@Override
toStringArrayback to summary
public static String[] toStringArray(Collection<NormalizedString> args)

Converts a collection of normalized strings into an array of String

Parameters
args:Collection<NormalizedString>

the normalized strings to convert back to to String

Returns:String[]

the String representations of all normalized strings.

toTreeSetback to summary
public static TreeSet<NormalizedString> toTreeSet(String... args)

Converts multiple plain strings into a TreeSet of NormalizedString.

Parameters
args:String[]

the strings to convert to NormalizedString

Returns:TreeSet<NormalizedString>

the NormalizedString representations of all input strings.

toTreeSetback to summary
public static TreeSet<NormalizedString> toTreeSet(Collection<String> args)

Converts multiple plain strings into a TreeSet of NormalizedString.

Parameters
args:Collection<String>

the strings to convert to NormalizedString

Returns:TreeSet<NormalizedString>

the NormalizedString representations of all input strings.

toTreeSetOfStringsback to summary
public static TreeSet<String> toTreeSetOfStrings(NormalizedString... args)

Converts multiple normalized strings into a HashSet of String.

Parameters
args:NormalizedString[]

the normalized strings to convert to String

Returns:TreeSet<String>

the original Strings of all input normalized strings.

toTreeSetOfStringsback to summary
public static TreeSet<String> toTreeSetOfStrings(Collection<NormalizedString> args)

Converts multiple normalized strings into a HashSet of String.

Parameters
args:Collection<NormalizedString>

the normalized strings to convert to String

Returns:TreeSet<String>

the original Strings of all input normalized strings.

toUniqueArrayback to summary
public static NormalizedString[] toUniqueArray(String... args)

Converts multiple plain strings into an array of NormalizedString, ensuring no duplicate NormalizedString elements exist, even if their original Strings are different.

Parameters
args:String[]

the strings to convert to NormalizedString

Returns:NormalizedString[]

the NormalizedString representations of all input strings.

valueOfback to summary
public static NormalizedString valueOf(Object o)

Creates a non-literal NormalizedString, meaning it will match with other String or NormalizedString regardless of different including character case and surrounding whitespaces. If the input value is enclosed with single quotes, a literal NormalizedString will be returned, as described in literalValueOf(String)

Parameters
o:Object

the input object whose String representation will be used

Returns:NormalizedString

the NormalizedString of the given object.

valueOfback to summary
public static NormalizedString valueOf(String string)

Creates a non-literal NormalizedString, meaning it will match with other String or NormalizedString regardless of different including character case and surrounding whitespaces. If the input string is enclosed with single quotes, a literal NormalizedString will be returned, as described in literalValueOf(String)

Parameters
string:String

the input string

Returns:NormalizedString

the NormalizedString of the given string.

valueOfback to summary
public static String valueOf(NormalizedString string)

Converts a NormalizedString back to its original String representation

Parameters
string:NormalizedString

the normalized string

Returns:String

the original string used to create the given normalized representation.