Class CaseScope

java.lang.Object
ai.redouble.examples.scopes.CaseScope
All Implemented Interfaces:
Scope
Direct Known Subclasses:
OrderScope

public class CaseScope extends Object implements Scope
The case axis: whose customer a piece of work is about. A class rather than a record, because OrderScope narrows it by extending it and records cannot be extended.
Since:
0.1 (2026-09-28)
Author:
Andrey Santrosyan
  • Constructor Details

    • CaseScope

      public CaseScope(String customerId)
  • Method Details

    • matches

      public boolean matches(Scope candidate)
      Description copied from interface: Scope
      Compares the candidate on the axes BOTH sides carry. Called only with a candidate that shares an axis with this scope, so the topmost level of the chain casts freely; every deeper level guards its own cast with instanceof and returns super.matches alone for a candidate that does not reach its depth. The default - value equality - is right for flat record scopes.
      Specified by:
      matches in interface Scope
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object