Top Description Inners Fields Constructors Methods
tech.units.indriya.internal.function.simplify

pack-priv final Class CompositionTaskBitScanner

extends Object
Class Inheritance
Imports
java.util.BitSet, java.util.function.Predicate

Package private bit mask utility for CompositionTask.
Author
Andi Huber
Since
2.0
Version
1.1

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
private final BitSet

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <T> CompositionTaskBitScanner

Returns:

BitScanner, that holds internally a BitSet, that represents with zeros and ones, whether the specified predicate bitTest is false or true with respect to the elements of the specified array
of
(T[] array, Predicate<T> bitTest)

public void
visitBitSequences(CompositionTaskBitScanner.BiIntConsumer visitor)

This BitScanner holds internally a BitSet.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bitSetback to summary
private final BitSet bitSet

Constructor Detail

CompositionTaskBitScannerback to summary
private CompositionTaskBitScanner(BitSet bitSet)

Method Detail

ofback to summary
public static <T> CompositionTaskBitScanner of(T[] array, Predicate<T> bitTest)
Returns:CompositionTaskBitScanner

BitScanner, that holds internally a BitSet, that represents with zeros and ones, whether the specified predicate bitTest is false or true with respect to the elements of the specified array

visitBitSequencesback to summary
public void visitBitSequences(CompositionTaskBitScanner.BiIntConsumer visitor)

This BitScanner holds internally a BitSet. The specified visitor is called for each sequence of consecutive ones, where each such call passes over 2 int parameters i, j.

i .. zero based start index of the processed one-sequence
j .. length of the processed one-sequence

Eg. given an internal BitSet represented by eg. 0-0-1-0-1-1-1-0, the resulting visitor calls would be:
visitor.accept(2, 1) - start at 2, length = 1
visitor.accept(4, 3) - start at 4, length = 3

tech.units.indriya.internal.function.simplify back to summary

public Interface CompositionTaskBitScanner.BiIntConsumer

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public void
accept(int i, int j)

Method Detail

acceptback to summary
public void accept(int i, int j)