Class Canonicalizer<T>
java.lang.Object
org.apache.parquet.hadoop.metadata.Canonicalizer<T>
- Type Parameters:
T- the type of values canonicalized by subclasses
returns canonical representation of objects (similar to String.intern()) to save memory
if a.equals(b) then canonicalize(a) == canonicalize(b)
this class is thread safe
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Canonicalizer
public Canonicalizer()
-
-
Method Details
-
canonicalize
- Parameters:
value- the value to canonicalize- Returns:
- the corresponding canonical value
-
toCanonical
- Parameters:
value- the value to canonicalize if needed- Returns:
- the canonicalized value
-