Interface ShortRangeConsumer
public interface ShortRangeConsumer
A ShortRangeConsumer receives the ranges contained in a data structure.
Each range is visited once, in increasing unsigned order, with non-overlapped boundaries.
In particular, the start position of a range needs to be strictly greater than the end
position of the previous range, both as unsigned values.
Usage:
bitmap.forEach(new ShortConsumer() {
public boolean accept(short value) {
// do something here
}
});
-
Method Summary
Modifier and Type Method Description boolean
accept(short unsignedStart, short unsignedEndInclusive)
Provides a value to this consumer.
-
Method Details
-
accept
boolean accept(short unsignedStart, short unsignedEndInclusive)Provides a value to this consumer. A false return value indicates that the application providing values to this consumer should not invoke it again.- Parameters:
unsignedStart
- the unsigned short value for the start of this range.unsignedEndInclusive
- the unsigned short value for the end of this range, inclusive.- Returns:
- false if don't want any more values after this one, true otherwise.
-