Package com.openhtmltopdf.util
Class LambdaUtil
- java.lang.Object
-
- com.openhtmltopdf.util.LambdaUtil
-
public class LambdaUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Predicate<T>alwaysFalse()static <T> Predicate<T>alwaysTrue()static StringancestorDump(Box bx)Ancestor dump to string including starting box and referenced layers.static Stream<Box>ancestors(Box bx)Null-safe way to look up the ancestor tree as a stream.static StringboxDescription(Box box)Null-safe box description including object id, layer, containing layer and impl class.static StringdescendantDump(Box root)Creates an indented dump of the box tree.static Stream<Box>descendants(Box parent)A stream of all descendant boxes not including InlineText or InlineBox objects.static List<Box>descendantsList(Box parent)Seedescendants(Box)static StringlayerDescription(Layer layer)Null-safe layer description including object id, toString and master box description.static StringobjectId(Object obj)Null-safe identity hash code.
-
-
-
Method Detail
-
ancestors
public static Stream<Box> ancestors(Box bx)
Null-safe way to look up the ancestor tree as a stream. Does not include starting box. Will return a empty stream if either bx or bx.getParent() is null.
-
descendants
public static Stream<Box> descendants(Box parent)
A stream of all descendant boxes not including InlineText or InlineBox objects. This would usually only be called after layout is concluded as InlineBox objects are converted to one or more InlineLayoutBox during layout. Should be in breadth first order.
-
descendantsList
public static List<Box> descendantsList(Box parent)
Seedescendants(Box)
-
boxDescription
public static String boxDescription(Box box)
Null-safe box description including object id, layer, containing layer and impl class. Debug only.
-
layerDescription
public static String layerDescription(Layer layer)
Null-safe layer description including object id, toString and master box description. Debug only.
-
ancestorDump
public static String ancestorDump(Box bx)
Ancestor dump to string including starting box and referenced layers. Debug only.
-
descendantDump
public static String descendantDump(Box root)
Creates an indented dump of the box tree. Includes both the pre-layout inline-content and if layout has been run, the after layout structure. Debug only.
-
alwaysTrue
public static <T> Predicate<T> alwaysTrue()
-
alwaysFalse
public static <T> Predicate<T> alwaysFalse()
-
-