use of com.joliciel.jochre.boundaries.ShapeInSequence in project jochre by urieli.
the class LastShapeInSequenceFeature method checkInternal.
@Override
public FeatureResult<Boolean> checkInternal(ShapeInSequenceWrapper wrapper, RuntimeEnvironment env) {
ShapeInSequence shapeInSequence = wrapper.getShapeInSequence();
boolean result = (shapeInSequence.getShapeSequence().size() == (shapeInSequence.getIndex() + 1));
FeatureResult<Boolean> outcome = this.generateResult(result);
return outcome;
}
use of com.joliciel.jochre.boundaries.ShapeInSequence in project jochre by urieli.
the class ShapeReverseIndexFeature method checkInternal.
@Override
public FeatureResult<Integer> checkInternal(ShapeInSequenceWrapper wrapper, RuntimeEnvironment env) {
ShapeInSequence shapeInSequence = wrapper.getShapeInSequence();
FeatureResult<Integer> outcome = null;
int reverseIndex = shapeInSequence.getShapeSequence().size() - (shapeInSequence.getIndex() + 1);
if (reverseIndex <= 1) {
outcome = this.generateResult(reverseIndex);
}
return outcome;
}
Aggregations