java.lang.Object
java.lang.Record
org.microbean.qualifier.NamedAttributeMap<V>
- All Implemented Interfaces:
Comparable<NamedAttributeMap<V>>,Constable,org.microbean.invoke.ContentHashable
public record NamedAttributeMap<V>(String name, Map<String,V> attributes, Map<String,V> info, Collection<NamedAttributeMap<V>> metadata)
extends Record
implements Comparable<NamedAttributeMap<V>>, Constable, org.microbean.invoke.ContentHashable
-
Constructor Summary
ConstructorsConstructorDescriptionNamedAttributeMap(String name) NamedAttributeMap(String name, Map<String, V> attributes) NamedAttributeMap(String name, Map<String, V> attributes, Map<String, V> info, Collection<NamedAttributeMap<V>> metadata) Creates an instance of aNamedAttributeMaprecord class.NamedAttributeMap(String name, V value) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.final intcompareTo(NamedAttributeMap<V> other) final booleanfinal Optional<DynamicConstantDesc<NamedAttributeMap<V>>>final booleanIndicates whether some other object is "equal to" this one.final Vfinal inthashCode()Returns a hash code value for this object.info()Returns the value of theinforecord component.final booleanisEmpty()metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.static final <V> NamedAttributeMap<V>of(String name, Map<String, V> attributes, Map<String, V> info, Collection<NamedAttributeMap<V>> metadata) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NamedAttributeMap
-
NamedAttributeMap
-
NamedAttributeMap
-
NamedAttributeMap
public NamedAttributeMap(String name, Map<String, V> attributes, Map<String, V> info, Collection<NamedAttributeMap<V>> metadata) Creates an instance of aNamedAttributeMaprecord class.- Parameters:
name- the value for thenamerecord componentattributes- the value for theattributesrecord componentinfo- the value for theinforecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
isEmpty
-
containsKey
-
get
-
contentHashInput
- Specified by:
contentHashInputin interfaceorg.microbean.invoke.ContentHashable
-
compareTo
- Specified by:
compareToin interfaceComparable<V>
-
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). -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
describeConstable
- Specified by:
describeConstablein interfaceConstable
-
of
public static final <V> NamedAttributeMap<V> of(String name, Map<String, V> attributes, Map<String, V> info, Collection<NamedAttributeMap<V>> metadata) -
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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-