Class GroupKey

java.lang.Object
com.trevlar.menukit.window.GroupKey

public final class GroupKey extends Object
A bulk-addressing group: a stable id plus a membership predicate over Addresses. The per-group level of the cascade — a default declared at a GroupKey applies to every address the predicate accepts, unless a per-slot declaration overrides it.

Window-side, not creation-bound (RULED #2 property c)

Membership is evaluated against an address, so a group can bulk-address vanilla slots, created slots, elements, or panels alike — it is NOT a creation construct welded to a slot group. Membership is evaluated per-resolve, so an address that comes to match later (a slot that appears after the group was declared) joins automatically.

Identity

Equality is by id alone (a predicate has no useful equality), so a group is a stable handle you can re-declare against. Two GroupKeys with the same id are the same group.
  • Constructor Details

    • GroupKey

      public GroupKey(net.minecraft.resources.Identifier id, Predicate<Address> membership)
  • Method Details

    • id

      public net.minecraft.resources.Identifier id()
    • contains

      public boolean contains(Address address)
      Whether address is a member of this group.
    • 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