Skip to content

Commit

Permalink
refactor: Adding @OverRide annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhishman committed Mar 18, 2024
1 parent ad9e7f5 commit 8a35dd2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/jsoup/select/QueryParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ interface CombinatorHandler {
}

class GreaterThanHandler implements CombinatorHandler {
@Override
public Evaluator handle(Evaluator currentEval, Evaluator newEval) {
ImmediateParentRun run = currentEval instanceof ImmediateParentRun ?
(ImmediateParentRun) currentEval : new ImmediateParentRun(currentEval);
Expand All @@ -440,24 +441,28 @@ public Evaluator handle(Evaluator currentEval, Evaluator newEval) {
}

class SpaceHandler implements CombinatorHandler {
@Override
public Evaluator handle(Evaluator currentEval, Evaluator newEval) {
return new CombiningEvaluator.And(new StructuralEvaluator.Parent(currentEval), newEval);
}
}

class PlusHandler implements CombinatorHandler {
@Override
public Evaluator handle(Evaluator currentEval, Evaluator newEval) {
return new CombiningEvaluator.And(new StructuralEvaluator.ImmediatePreviousSibling(currentEval), newEval);
}
}

class TildeHandler implements CombinatorHandler {
@Override
public Evaluator handle(Evaluator currentEval, Evaluator newEval) {
return new CombiningEvaluator.And(new StructuralEvaluator.PreviousSibling(currentEval), newEval);
}
}

class CommaHandler implements CombinatorHandler {
@Override
public Evaluator handle(Evaluator currentEval, Evaluator newEval) {
CombiningEvaluator.Or or;
if (currentEval instanceof CombiningEvaluator.Or) {
Expand Down

0 comments on commit 8a35dd2

Please sign in to comment.