Class OrderScope

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

public class OrderScope extends CaseScope
A narrowing of the case axis: one order of one customer. Extending CaseScope is what relates the two, so a case binding judges an order claim and an order binding judges a plain case claim, on the part both carry.
Since:
0.1 (2026-09-28)
Author:
Andrey Santrosyan
  • Constructor Details

    • OrderScope

      public OrderScope(String customerId, String orderNumber)
  • 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
      Overrides:
      matches in class CaseScope
    • equals

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

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

      public String toString()
      Overrides:
      toString in class CaseScope