java.lang.Object
java.lang.Record
org.microbean.scope.Scope
- All Implemented Interfaces:
Constable
,ScopeMember
public record Scope(org.microbean.qualifier.NamedAttributeMap<?> id, boolean normal, org.microbean.qualifier.NamedAttributeMap<?> governingScopeId)
extends Record
implements Constable, ScopeMember
-
Field Summary
-
Constructor Summary
ConstructorDescriptionScope
(org.microbean.qualifier.NamedAttributeMap<?> id, boolean normal, org.microbean.qualifier.NamedAttributeMap<?> governingScopeId) Creates an instance of aScope
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal Optional<? extends ConstantDesc>
final boolean
Indicates whether some other object is "equal to" this one.org.microbean.qualifier.NamedAttributeMap<?>
Returns the value of thegoverningScopeId
record component.final int
hashCode()
Returns a hash code value for this object.org.microbean.qualifier.NamedAttributeMap<?>
id()
Returns the value of theid
record component.boolean
normal()
Returns the value of thenormal
record component.static final Scope
of
(org.microbean.qualifier.NamedAttributeMap<?> id, boolean normal, org.microbean.qualifier.NamedAttributeMap<?> governingScopeId) final boolean
final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.microbean.scope.ScopeMember
governedBy
-
Field Details
-
SINGLETON_ID
-
SINGLETON
-
NONE_ID
-
NONE
-
-
Constructor Details
-
Scope
public Scope(org.microbean.qualifier.NamedAttributeMap<?> id, boolean normal, org.microbean.qualifier.NamedAttributeMap<?> governingScopeId) Creates an instance of aScope
record class.- Parameters:
id
- the value for theid
record componentnormal
- the value for thenormal
record componentgoverningScopeId
- the value for thegoverningScopeId
record component
-
-
Method Details
-
describeConstable
- Specified by:
describeConstable
in interfaceConstable
-
primordial
-
of
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
normal
Returns the value of thenormal
record component.- Returns:
- the value of the
normal
record component
-
governingScopeId
Returns the value of thegoverningScopeId
record component.- Specified by:
governingScopeId
in interfaceScopeMember
- Returns:
- the value of the
governingScopeId
record component
-