Record Class Id
java.lang.Object
java.lang.Record
org.microbean.bean.Id
- Record Components:
types- aListofTypeMirrorsattributes- aListofNamedAttributeMapsgoverningScopeId- aNamedAttributeMapidentifying the scope to which thisIdlogically belongsalternate- whether thisIdis to be considered an alternaterank- the rank of thisId
- All Implemented Interfaces:
Constable,Ranked,ScopeMember
public record Id(List<TypeMirror> types, List<NamedAttributeMap<?>> attributes, NamedAttributeMap<?> governingScopeId, boolean alternate, int rank)
extends Record
implements Constable, Ranked, ScopeMember
An identifier for a
Bean.- Author:
- Laird Nelson
- See Also:
-
Field Summary
Fields inherited from interface org.microbean.bean.Ranked
DEFAULT_RANK -
Constructor Summary
ConstructorsConstructorDescriptionId(List<TypeMirror> types, List<NamedAttributeMap<?>> attributes, NamedAttributeMap<?> governingScopeId) Creates a newIdthat is not an alternate and that has a default rank.Id(List<TypeMirror> types, List<NamedAttributeMap<?>> attributes, NamedAttributeMap<?> governingScopeId, boolean alternate, int rank) Creates a newId.Id(List<TypeMirror> types, List<NamedAttributeMap<?>> attributes, NamedAttributeMap<?> governingScopeId, int rank) Creates a newIdthat is not an alternate. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thealternaterecord component.Returns the value of theattributesrecord component.final Optional<DynamicConstantDesc<Id>> final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegoverningScopeIdrecord component.final inthashCode()Returns a hash code value for this object.intrank()Returns the value of therankrecord component.final StringtoString()Returns a string representation of this record class.types()Returns the value of thetypesrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.microbean.scope.ScopeMember
governedBy
-
Constructor Details
-
Id
public Id(List<TypeMirror> types, List<NamedAttributeMap<?>> attributes, NamedAttributeMap<?> governingScopeId) Creates a newIdthat is not an alternate and that has a default rank.- Parameters:
types- aListofTypeMirrors; must not benull; must not be emptyattributes- aListofNamedAttributeMaps; must not benullgoverningScopeId- aNamedAttributeMapidentifying the scope to which thisIdlogically belongs; must not benull- Throws:
NullPointerException- iftypes,attributes, orgoverningScopeIdisnull
-
Id
public Id(List<TypeMirror> types, List<NamedAttributeMap<?>> attributes, NamedAttributeMap<?> governingScopeId, int rank) Creates a newIdthat is not an alternate.- Parameters:
types- aListofTypeMirrors; must not benull; must not be emptyattributes- aListofNamedAttributeMaps; must not benullgoverningScopeId- aNamedAttributeMapidentifying the scope to which thisIdlogically belongs; must not benullrank- the rank of thisId- Throws:
NullPointerException- iftypes,attributes, orgoverningScopeIdisnull
-
Id
public Id(List<TypeMirror> types, List<NamedAttributeMap<?>> attributes, NamedAttributeMap<?> governingScopeId, boolean alternate, int rank) Creates a newId.- Parameters:
types- aListofTypeMirrors; must not benull; must not be emptyattributes- aListofNamedAttributeMaps; must not benullgoverningScopeId- aNamedAttributeMapidentifying the scope to which thisIdlogically belongs; must not benullalternate- whether thisIdis to be considered an alternaterank- the rank of thisId- Throws:
NullPointerException- iftypes,attributes, orgoverningScopeIdisnull
-
-
Method Details
-
describeConstable
- Specified by:
describeConstablein interfaceConstable
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
types
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
governingScopeId
Returns the value of thegoverningScopeIdrecord component.- Specified by:
governingScopeIdin interfaceScopeMember- Returns:
- the value of the
governingScopeIdrecord component
-
alternate
-
rank
-