Record Class AttributedElement
java.lang.Object
java.lang.Record
org.microbean.assign.AttributedElement
- Record Components:
element- anElementattributes- aListofAttributess
- All Implemented Interfaces:
Constable,Attributed
public record AttributedElement(Element element, List<Attributes> attributes)
extends Record
implements Attributed, Constable
- Author:
- Laird Nelson
-
Constructor Summary
ConstructorsConstructorDescriptionAttributedElement(Element element, List<Attributes> attributes) Creates a newAttributedElement. -
Method Summary
Modifier and TypeMethodDescriptionfinal AttributedTypeReturns thisAttributedElement'sAttributedType.Returns the value of theattributesrecord component.Optional<? extends ConstantDesc> Returns anOptionalcontaining aConstantDescdescribing thisAttributedType, or an emptyOptionalif it could not be described.element()Returns the value of theelementrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.final TypeMirrortype()Returns thisAttributedElement's type.
-
Constructor Details
-
AttributedElement
Creates a newAttributedElement.- Parameters:
element- aElement; must not benullattributes- aListofAttributes; must not benull- Throws:
NullPointerException- if either argument isnull
-
-
Method Details
-
type
Returns thisAttributedElement's type.- Returns:
- this
AttributedElement's type; nevernull
-
attributedType
Returns thisAttributedElement'sAttributedType.- Returns:
- this
AttributedElement'sAttributedType; nevernull - See Also:
-
describeConstable
Returns anOptionalcontaining aConstantDescdescribing thisAttributedType, or an emptyOptionalif it could not be described.- Specified by:
describeConstablein interfaceConstable- Returns:
- an
Optionalcontaining aConstantDescdescribing thisAttributedType, or an emptyOptionalif it could not be describe; nevernull
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
element
-
attributes
Returns the value of theattributesrecord component.- Specified by:
attributesin interfaceAttributed- Returns:
- the value of the
attributesrecord component
-