Class LambdaUtil


  • public class LambdaUtil
    extends Object
    • 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.
      • objectId

        public static String objectId​(Object obj)
        Null-safe identity hash code. Debug only.
      • 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()