Package eu.bandm.tools.format
Enum Class CompoundConstructor
- All Implemented Interfaces:
Serializable
,Comparable<CompoundConstructor>
,java.lang.constant.Constable
,Function<Collection<Format>,
Format>
public enum CompoundConstructor
extends Enum<CompoundConstructor>
implements Function<Collection<Format>,Format>
Re-ification of the combination strategy applied by the different subclasses
of
Format.Compound
for combining their sub-formats.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Format.Compound
Returns an instance of the correctly chosen sub-class ofFormat.Compound
which corresponds to the combination method represented by the enumeration value.abstract Format
apply
(Collection<Format> subs) Returns an instance of the correctly chosen sub-class ofFormat.Compound
which corresponds to the combination method represented by the enumeration value.static CompoundConstructor
Returns the enum constant of this class with the specified name.static CompoundConstructor[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
tabular
-
append
-
block
-
line
-
beside
-
beneath
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
apply
Returns an instance of the correctly chosen sub-class ofFormat.Compound
which corresponds to the combination method represented by the enumeration value. Goes via the factory methods, so it can return a singleton list content or an instance of Empty.- Specified by:
apply
in interfaceFunction<Collection<Format>,
Format>
-
apply
public abstract Format.Compound apply(int i, int a, boolean m, boolean g, int indent, List<Format> subs) Returns an instance of the correctly chosen sub-class ofFormat.Compound
which corresponds to the combination method represented by the enumeration value.
-