com.evolveum.midpoint.prism.polystring
Class PolyString
java.lang.Object
com.evolveum.midpoint.prism.polystring.PolyString
- All Implemented Interfaces:
- Recomputable, Structured, DebugDumpable, Dumpable, java.io.Serializable
public class PolyString
- extends java.lang.Object
- implements Recomputable, Structured, Dumpable, DebugDumpable, java.io.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
Constructor Summary |
PolyString(java.lang.String orig)
|
PolyString(java.lang.String orig,
java.lang.String norm)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
PolyString
public PolyString(java.lang.String orig)
PolyString
public PolyString(java.lang.String orig,
java.lang.String norm)
getOrig
public java.lang.String getOrig()
getNorm
public java.lang.String getNorm()
isEmpty
public boolean isEmpty()
recompute
public void recompute(PolyStringNormalizer normalizer)
isComputed
public boolean isComputed()
resolve
public java.lang.Object resolve(ItemPath subpath)
- Specified by:
resolve
in interface Structured
plus
public PolyString plus(PolyString other)
plus
public PolyString plus(java.lang.String other)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
equalsOriginalValue
public boolean equalsOriginalValue(Recomputable obj)
- Specified by:
equalsOriginalValue
in interface Recomputable
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
dump
public java.lang.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 java.lang.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 java.lang.String debugDump(int indent)
- Specified by:
debugDump
in interface DebugDumpable
Copyright © 2012 evolveum. All Rights Reserved.