/** * @param value the value to canonicalize * @return the corresponding canonical value */ final public T canonicalize(T value) { T canonical = canonicals.get(value); if (canonical == null) { value = toCanonical(value); T existing = canonicals.putIfAbsent(value, value); // putIfAbsent is atomic, making sure we always return the same canonical representation of the value if (existing == null) { canonical = value; } else { canonical = existing; } } return canonical; }
public static EncodingList getEncodingList(List<Encoding> encodings) { return encodingLists.canonicalize(new EncodingList(encodings)); }
public static ColumnPath get(String... path){ return paths.canonicalize(new ColumnPath(path)); }
public static ColumnChunkProperties get(ColumnPath path, PrimitiveTypeName type, CompressionCodecName codec, Set<Encoding> encodings) { return properties.canonicalize(new ColumnChunkProperties(codec, path, type, encodings)); }
/** * @param value the value to canonicalize * @return the corresponding canonical value */ final public T canonicalize(T value) { T canonical = canonicals.get(value); if (canonical == null) { value = toCanonical(value); T existing = canonicals.putIfAbsent(value, value); // putIfAbsent is atomic, making sure we always return the same canonical representation of the value if (existing == null) { canonical = value; } else { canonical = existing; } } return canonical; }
public static ColumnPath get(String... path){ return paths.canonicalize(new ColumnPath(path)); }