Class IsHierarchyWideSameness
java.lang.Object
org.ek9lang.compiler.support.sameness.IsHierarchyWideSameness
- All Implemented Interfaces:
Predicate<IAggregateSymbol>
THE "is the sameness this type declares ONE sameness for its whole hierarchy?" (D24 rule 1). Only when it is
WRITTEN BY HAND on an ABSTRACT class or a TRAIT - an ordering over what every sub-type provides
(
area() <=> other.area()). A DEFAULTED sameness on an abstract base (D24 follow-up Q1, Steve 2026-10-20)
compares only the base's own fields, so it acts as if the base were concrete: each concrete sub-type has its own
over all its fields, and different run-time types are never the same. A concrete type's sameness is its own (D24
rule 2). Sub-types inherit a hierarchy-wide sameness sealed (SealedSameness). Hold one and ask it.-
Constructor Details
-
IsHierarchyWideSameness
public IsHierarchyWideSameness()
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<IAggregateSymbol>
-