public final class ElementListUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
calcContentLength(java.util.List elems)
Calculates the content length of the given element list.
|
static int |
calcContentLength(java.util.List elems,
int start,
int end)
Calculates the content length of the given element list.
|
static int |
determinePreviousBreak(java.util.List elems,
int startIndex)
Determines the position of the previous break before the start index on an
element list.
|
static boolean |
endsWithForcedBreak(java.util.List elems)
Indicates whether the given element list ends with a forced break.
|
static boolean |
endsWithNonInfinitePenalty(java.util.List elems)
Indicates whether the given element list ends with a penalty with a non-infinite penalty
value.
|
static boolean |
isEmptyBox(java.util.List elements) |
static boolean |
removeLegalBreaks(java.util.List elements,
int constraint)
Removes legal breaks in an element list.
|
static boolean |
removeLegalBreaks(java.util.List elements,
MinOptMax constraint)
Removes legal breaks in an element list.
|
static boolean |
removeLegalBreaksFromEnd(java.util.List elements,
int constraint)
Removes legal breaks in an element list.
|
static boolean |
startsWithForcedBreak(java.util.List elems)
Indicates whether the given element list starts with a forced break.
|
public static boolean removeLegalBreaks(java.util.List elements,
MinOptMax constraint)
elements - the element listconstraint - min/opt/max value to restrict the range in which the breaks are removed.public static boolean removeLegalBreaks(java.util.List elements,
int constraint)
elements - the element listconstraint - value to restrict the range in which the breaks are removed.public static boolean removeLegalBreaksFromEnd(java.util.List elements,
int constraint)
elements - the element listconstraint - value to restrict the range in which the breaks are removed.public static int calcContentLength(java.util.List elems,
int start,
int end)
elems - the element liststart - element at which to startend - element at which to stoppublic static int calcContentLength(java.util.List elems)
elems - the element listpublic static boolean endsWithForcedBreak(java.util.List elems)
elems - the element listpublic static boolean startsWithForcedBreak(java.util.List elems)
elems - the element listpublic static boolean endsWithNonInfinitePenalty(java.util.List elems)
elems - the element listpublic static int determinePreviousBreak(java.util.List elems,
int startIndex)
elems - the element liststartIndex - the start indexpublic static boolean isEmptyBox(java.util.List elements)
Copyright 1999-2022 The Apache Software Foundation. All Rights Reserved.