public final class CodecFactory extends Object
Modifier and Type | Method and Description |
---|---|
static <E extends Enum<E>> |
createCodecForEnumNames(Class<E> eClass)
A convenience method to create a string codec for
the constant names of the specified enumeration class.
|
static ClassNameCodec |
createEntropicCodecForClassNames()
A convenience method to create an entropic string codec
tailored for class names.
|
static EntropicStringSetCodec |
createEntropicStringSetCodec(Set<String> originals,
Algorithm a)
Creates and returns an entropic string codec instance.
|
static <E extends Enum<E>> |
createEnumCodec(Class<E> eClass)
Creates and returns an EnumCodec for the specified enum class.
|
static StringCodec |
createGeneralCodec(Set<String> originals)
A convenience method to create a string codec for a general
set of strings.
|
static StringSetCodec |
createStringSetCodec(Set<String> originals,
Algorithm a)
Creates and returns a string codec instance.
|
public static StringSetCodec createStringSetCodec(Set<String> originals, Algorithm a)
Algorithm.PREFIX
algorithm will be employed.originals
- the original strings with which to initialize the codeca
- the encoding algorithm to useNullPointerException
- if originals is nullIllegalArgumentException
- if originals is emptypublic static EntropicStringSetCodec createEntropicStringSetCodec(Set<String> originals, Algorithm a)
Algorithm.PREFIX
algorithm will be employed.originals
- the original strings with which to initialize the codeca
- the encoding algorithm to usepublic static StringCodec createGeneralCodec(Set<String> originals)
originals
- the original string setpublic static <E extends Enum<E>> StringCodec createCodecForEnumNames(Class<E> eClass)
E
- constraint that the class must extend EnumeClass
- the enumeration classpublic static ClassNameCodec createEntropicCodecForClassNames()
Copyright © 2015. All Rights Reserved.