Class CharRecoveryOptimizer

    • Constructor Detail

      • CharRecoveryOptimizer

        public CharRecoveryOptimizer​(PositionAnchor anchor)
    • Method Detail

      • apply

        public Object[] apply​(@NotNull
                              @NotNull CharSequence chars,
                              Object[] parts)
        Description copied from interface: SegmentOptimizer
        Optimize segment BASE parts surrounding TEXT contained in Object[] array.
        Specified by:
        apply in interface BiFunction<CharSequence,​Object[],​Object[]>
        Specified by:
        apply in interface SegmentOptimizer
        Parameters:
        chars - base character sequence
        parts - parts to optimize Object[0] - previous BASE Range, will be Range.NULL if no previous range Object[1] - char sequence of TEXT to optimize Object[2] - next BASE Range, will be Range.NULL if no next range
        Returns:
        Object[] containing optimized segments, non-null Range(s) are BASE segments, CharSequence(s) are TEXT segments null entry ignored, an optimal filler for unused entries Range with -ve start/end or -ve span are skipped CharSequence with 0 length skipped