TrueZIP Kernel 7.0-rc1

de.schlichtherle.truezip.util
Interface CanonicalStringSet.Canonicalizer

All Known Implementing Classes:
SuffixSet.SuffixMapper
Enclosing class:
CanonicalStringSet

public static interface CanonicalStringSet.Canonicalizer

An idempotent function which maps an arbitrary object to its canonical string representation.

See Also:
Method Summary
 String map(Object o)
          Returns the canonical string representation of o or null if the canonical string representation is undefined.
 

Method Detail

map

@CheckForNull
String map(@Nullable
                        Object o)
Returns the canonical string representation of o or null if the canonical string representation is undefined. This method is expected to be an idempotent function, i.e. it shall have no side effects and the result of calling the function for its result again at least compares Object.equals(java.lang.Object) to its initial result. E.g. the method Object.toString() is a simple implementation of this method because you could call it several times on its result: The first call results in a string and each subsequent call would return the same string again.

Parameters:
o - The Object to map to its canonical string representation.
Returns:
The canonical string representation of o or null if the canonical string representation is undefined.

TrueZIP Kernel 7.0-rc1

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.