public final class ElementListUtils extends Object
Modifier and Type | Method and Description |
---|---|
static int |
calcContentLength(List elems)
Calculates the content length of the given element list.
|
static int |
calcContentLength(List<ListElement> elems,
int start,
int end)
Calculates the content length of the given element list.
|
static int |
determinePreviousBreak(List<ListElement> elems,
int startIndex)
Determines the position of the previous break before the start index on an
element list.
|
static boolean |
endsWithForcedBreak(List<ListElement> elems)
Indicates whether the given element list ends with a forced break.
|
static boolean |
endsWithNonInfinitePenalty(List<ListElement> elems)
Indicates whether the given element list ends with a penalty with a non-infinite penalty
value.
|
static boolean |
isEmptyBox(List elements) |
static boolean |
removeLegalBreaks(List<ListElement> elements,
MinOptMax constraint)
Removes legal breaks in an element list.
|
static boolean |
removeLegalBreaks(List elements,
int constraint)
Removes legal breaks in an element list.
|
static boolean |
removeLegalBreaksFromEnd(List elements,
int constraint)
Removes legal breaks in an element list.
|
static boolean |
startsWithForcedBreak(List<ListElement> elems)
Indicates whether the given element list starts with a forced break.
|
public static boolean removeLegalBreaks(List<ListElement> 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(List elements, int constraint)
elements
- the element listconstraint
- value to restrict the range in which the breaks are removed.public static boolean removeLegalBreaksFromEnd(List elements, int constraint)
elements
- the element listconstraint
- value to restrict the range in which the breaks are removed.public static int calcContentLength(List<ListElement> elems, int start, int end)
elems
- the element liststart
- element at which to startend
- element at which to stoppublic static int calcContentLength(List elems)
elems
- the element listpublic static boolean endsWithForcedBreak(List<ListElement> elems)
elems
- the element listpublic static boolean startsWithForcedBreak(List<ListElement> elems)
elems
- the element listpublic static boolean endsWithNonInfinitePenalty(List<ListElement> elems)
elems
- the element listpublic static int determinePreviousBreak(List<ListElement> elems, int startIndex)
elems
- the element liststartIndex
- the start indexpublic static boolean isEmptyBox(List elements)
Copyright © 2025 Apache Software Foundation. All rights reserved.