Package com.helger.pdflayout.base
Enum EPLPlaceholder
- java.lang.Object
-
- java.lang.Enum<EPLPlaceholder>
-
- com.helger.pdflayout.base.EPLPlaceholder
-
- All Implemented Interfaces:
Serializable,Comparable<EPLPlaceholder>
public enum EPLPlaceholder extends Enum<EPLPlaceholder>
Contains a list of supported textual placeholders to be replaced when creating a PDF.- Author:
- Philip Helger
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PAGESET_COUNTtotal number of pagesetsPAGESET_INDEX0-based index of current pagesetPAGESET_NUMBER1-based number of current pageset (same as pageset-index+1)PAGESET_PAGE_COUNTcount of pages in current pagesetPAGESET_PAGE_INDEX0-based index of page in current pagesetPAGESET_PAGE_NUMBER1-based index of page in current pagesetTOTAL_PAGE_COUNTtotal page countTOTAL_PAGE_INDEXoverall 0-based page indexTOTAL_PAGE_NUMBERoverall 1-based page number
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetEstimatedCharCount()StringgetEstimatedPrepareText()static com.helger.commons.collection.impl.ICommonsMap<String,String>getEstimationReplacements()static EPLPlaceholdergetFromVariableOrNull(String sVariable)StringgetVariable()static EPLPlaceholdervalueOf(String name)Returns the enum constant of this type with the specified name.static EPLPlaceholder[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PAGESET_INDEX
public static final EPLPlaceholder PAGESET_INDEX
0-based index of current pageset
-
PAGESET_NUMBER
public static final EPLPlaceholder PAGESET_NUMBER
1-based number of current pageset (same as pageset-index+1)
-
PAGESET_COUNT
public static final EPLPlaceholder PAGESET_COUNT
total number of pagesets
-
PAGESET_PAGE_INDEX
public static final EPLPlaceholder PAGESET_PAGE_INDEX
0-based index of page in current pageset
-
PAGESET_PAGE_NUMBER
public static final EPLPlaceholder PAGESET_PAGE_NUMBER
1-based index of page in current pageset
-
PAGESET_PAGE_COUNT
public static final EPLPlaceholder PAGESET_PAGE_COUNT
count of pages in current pageset
-
TOTAL_PAGE_INDEX
public static final EPLPlaceholder TOTAL_PAGE_INDEX
overall 0-based page index
-
TOTAL_PAGE_NUMBER
public static final EPLPlaceholder TOTAL_PAGE_NUMBER
overall 1-based page number
-
TOTAL_PAGE_COUNT
public static final EPLPlaceholder TOTAL_PAGE_COUNT
total page count
-
-
Method Detail
-
values
public static EPLPlaceholder[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EPLPlaceholder c : EPLPlaceholder.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EPLPlaceholder valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getVariable
@Nonnull @Nonempty public String getVariable()
- Returns:
- The name of the variable, starting with "${" and ending with "}".
Neither
nullnor empty.
-
getEstimatedCharCount
@Nonnegative public int getEstimatedCharCount()
- Returns:
- The number of estimated characters in the final document. Always > 0.
-
getEstimatedPrepareText
@Nonnull @Nonempty public String getEstimatedPrepareText()
- Returns:
- The estimated replacement text, using
getEstimatedCharCount()as the basis.
-
getFromVariableOrNull
@Nullable public static EPLPlaceholder getFromVariableOrNull(@Nullable String sVariable)
-
-