public class PolyString extends Object implements Matchable<PolyString>, Recomputable, Structured, DebugDumpable, ShortDumpable, Serializable, Comparable<Object>
Modifier and Type | Field and Description |
---|---|
static ItemName |
F_LANG |
static ItemName |
F_NORM |
static ItemName |
F_ORIG |
static ItemName |
F_TRANSLATION |
INDENT_STRING
Constructor and Description |
---|
PolyString(String orig) |
PolyString(String orig,
String norm) |
PolyString(String orig,
String norm,
PolyStringTranslationType translation) |
PolyString(String orig,
String norm,
PolyStringTranslationType translation,
Map<String,String> lang) |
Modifier and Type | Method and Description |
---|---|
void |
checkConsistence() |
int |
compareTo(Object other) |
String |
debugDump(int indent) |
boolean |
endsWith(String value)
Helper function that checks whether this original string ends with the specified value.
|
boolean |
equals(Object obj) |
boolean |
equalsOriginalValue(Recomputable obj) |
static PolyString |
fromOrig(String orig) |
PolyString |
getAt(int index) |
Map<String,String> |
getLang() |
String |
getNorm() |
String |
getOrig() |
static String |
getOrig(PolyString s) |
static String |
getOrig(PolyStringType s) |
PolyStringTranslationType |
getTranslation() |
int |
hashCode() |
boolean |
isComputed() |
boolean |
isEmpty() |
boolean |
isNull() |
boolean |
isSimple()
Returns true if the PolyString form contains only simple string.
|
int |
length() |
boolean |
match(PolyString other) |
boolean |
matches(String regex) |
PolyString |
plus(Object other) |
void |
recompute(PolyStringNormalizer normalizer) |
Object |
resolve(ItemPath subpath) |
void |
setComputedOrig(String computedOrig)
Used to set computed values of orig, e.g.
|
void |
setLang(Map<String,String> lang)
Do NOT rely on this method too much.
|
void |
setTranslation(PolyStringTranslationType translation)
Do NOT rely on this method too much.
|
void |
shortDump(StringBuilder sb)
Show the content of the object intended for diagnostics.
|
boolean |
startsWith(String value)
Helper function that checks whether this original string begins with the specified value.
|
String |
substring(int from,
int to) |
static PolyString |
toPolyString(PolyStringType value) |
static PolyStringType |
toPolyStringType(PolyString value) |
String |
toString() |
PolyString |
trim() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
debugDump, debugDumpLazily, debugDumpLazily
shortDump, shortDumpLazily
public static final ItemName F_ORIG
public static final ItemName F_NORM
public static final ItemName F_TRANSLATION
public static final ItemName F_LANG
public PolyString(String orig)
public PolyString(String orig, String norm, PolyStringTranslationType translation)
public String getOrig()
public void setComputedOrig(String computedOrig)
public String getNorm()
public PolyStringTranslationType getTranslation()
public void setTranslation(PolyStringTranslationType translation)
public void setLang(Map<String,String> lang)
public boolean isEmpty()
public boolean isNull()
public void recompute(PolyStringNormalizer normalizer)
public boolean isComputed()
public Object resolve(ItemPath subpath)
resolve
in interface Structured
public PolyString plus(Object other)
public PolyString getAt(int index)
public int compareTo(Object other)
compareTo
in interface Comparable<Object>
public int length()
public PolyString trim()
public String substring(int from, int to)
public boolean startsWith(String value)
value
- the valuepublic boolean endsWith(String value)
value
- the valuepublic boolean equalsOriginalValue(Recomputable obj)
equalsOriginalValue
in interface Recomputable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
public void shortDump(StringBuilder sb)
ShortDumpable
shortDump
in interface ShortDumpable
sb
- StringBuilder to which to a compact one-line content of the object intended
for diagnostics by system administrator should be appended.public static String getOrig(PolyString s)
public static String getOrig(PolyStringType s)
public boolean match(PolyString other)
match
in interface Matchable<PolyString>
public boolean matches(String regex)
matches
in interface Matchable<PolyString>
public boolean isSimple()
public void checkConsistence()
checkConsistence
in interface Recomputable
public static PolyString toPolyString(PolyStringType value)
public static PolyStringType toPolyStringType(PolyString value)
public static PolyString fromOrig(String orig)
Copyright © 2019 Evolveum. All rights reserved.