com.evolveum.midpoint.prism.polystring
Class PolyString
java.lang.Object
com.evolveum.midpoint.prism.polystring.PolyString
- All Implemented Interfaces:
- Recomputable, Structured, DebugDumpable, Dumpable, Serializable
public class PolyString
- extends Object
- implements Recomputable, Structured, Dumpable, DebugDumpable, Serializable
Polymorphic string. String that may have more than one representation at
the same time. The primary representation is the original version that is
composed of the full Unicode character set. The other versions may be
normalized to trim it, normalize character case, normalize spaces,
remove national characters or even transliterate the string.
PolyString is (almost) immutable. The original value is immutable, but the
other normalized values can be changed. However the only way to change them
is to recompute them from the original value.
- Author:
- Radovan Semancik
- See Also:
- Serialized Form
PolyString
public PolyString(String orig)
PolyString
public PolyString(String orig,
String norm)
getOrig
public String getOrig()
getNorm
public String getNorm()
isEmpty
public boolean isEmpty()
recompute
public void recompute(PolyStringNormalizer normalizer)
isComputed
public boolean isComputed()
resolve
public Object resolve(ItemPath subpath)
- Specified by:
resolve
in interface Structured
plus
public PolyString plus(PolyString other)
plus
public PolyString plus(String other)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
equalsOriginalValue
public boolean equalsOriginalValue(Recomputable obj)
- Specified by:
equalsOriginalValue
in interface Recomputable
toString
public String toString()
- Overrides:
toString
in class Object
dump
public String dump()
- Description copied from interface:
Dumpable
- Show the content of the object intended for diagnostics by developer.
The content may be multi-line, in case of hierarchical objects it may be intended.
The use of this method may not be efficient. It is not supposed to be used in normal operation.
However, it is very useful in tests or in case of dumping objects in severe error situations.
- Specified by:
dump
in interface Dumpable
- Returns:
- content of the object intended for diagnostics.
debugDump
public String debugDump()
- Description copied from interface:
DebugDumpable
- Show the content of the object intended for diagnostics by system administrator. The out
put should be suitable to use in system logs at "debug" level. It may be multi-line, but in
that case it should be well indented and quite terse.
As it is intended to be used by system administrator, it should not use any developer terms
such as class names, exceptions or stack traces.
- Specified by:
debugDump
in interface DebugDumpable
- Returns:
- content of the object intended for diagnostics by system administrator.
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interface DebugDumpable
getOrig
public static String getOrig(PolyString s)
getOrig
public static String getOrig(PolyStringType s)
Copyright © 2013 evolveum. All Rights Reserved.