public final class AlignmentRules
extends java.lang.Object
AlignmentRule.| Modifier and Type | Method and Description |
|---|---|
static AlignmentRule |
compose(AlignmentRule... rules)
A rule that applies other rules in order.
|
static AlignmentRule |
constant(int alignment)
A rule that defines a constant alignment for all files.
|
static AlignmentRule |
constantForSuffix(java.lang.String suffix,
int alignment)
A rule that defines constant alignment for all files with a certain suffix, placing no
restrictions on other files.
|
public static AlignmentRule constant(int alignment)
alignment - the alignmentpublic static AlignmentRule constantForSuffix(@Nonnull java.lang.String suffix, int alignment)
suffix - the suffixalignment - the alignment for paths that match the provided suffixpublic static AlignmentRule compose(@Nonnull AlignmentRule... rules)
rules - all rules to be tried; the first rule that does not return
AlignmentRule.NO_ALIGNMENT will define the alignment for a path; if there are no
rules that return a value different from AlignmentRule.NO_ALIGNMENT, then
AlignmentRule.NO_ALIGNMENT is returned