Top Inners Constructors Methods
com.openhtmltopdf.util

public Class LambdaUtil

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .Objects, java.util.function.Predicate, java.util.stream.Collectors, .IntStream, .Stream, .StreamSupport, com.openhtmltopdf.layout.Layer, com.openhtmltopdf.render.BlockBox, .Box, .InlineLayoutBox

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <T> Predicate<T>
public static <T> Predicate<T>
public static String
ancestorDump(Box bx)

Ancestor dump to string including starting box and referenced layers.

public static Stream<Box>
ancestors(Box bx)

Null-safe way to look up the ancestor tree as a stream.

public static String
boxDescription(Box box)

Null-safe box description including object id, layer, containing layer and impl class.

private static void
public static String
descendantDump(Box root)

Creates an indented dump of the box tree.

public static Stream<Box>
descendants(Box parent)

A stream of all descendant boxes not including InlineText or InlineBox objects.

public static List<Box>
public static String
layerDescription(Layer layer)

Null-safe layer description including object id, toString and master box description.

public static String
objectId(Object obj)

Null-safe identity hash code.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LambdaUtilback to summary
private LambdaUtil()

Method Detail

alwaysFalseback to summary
public static <T> Predicate<T> alwaysFalse()
alwaysTrueback to summary
public static <T> Predicate<T> alwaysTrue()
ancestorDumpback to summary
public static String ancestorDump(Box bx)

Ancestor dump to string including starting box and referenced layers. Debug only.

ancestorsback to summary
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.

boxDescriptionback to summary
public static String boxDescription(Box box)

Null-safe box description including object id, layer, containing layer and impl class. Debug only.

descendantDumpback to summary
private static void descendantDump(Box parent, int indent, List<LambdaUtil.DescendantContent> out)
descendantDumpback to summary
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.

descendantsback to summary
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.

descendantsListback to summary
public static List<Box> descendantsList(Box parent)

See descendants(Box)

layerDescriptionback to summary
public static String layerDescription(Layer layer)

Null-safe layer description including object id, toString and master box description. Debug only.

objectIdback to summary
public static String objectId(Object obj)

Null-safe identity hash code. Debug only.

com.openhtmltopdf.util back to summary

private Class LambdaUtil.DescendantContent

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final int
pack-priv final Object

Constructor Summary

AccessConstructor and Description
pack-priv
DescendantContent(Object obj, int indent)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

indentback to summary
pack-priv final int indent
objectback to summary
pack-priv final Object object

Constructor Detail

DescendantContentback to summary
pack-priv DescendantContent(Object obj, int indent)