Record Class BasicPrimitiveEntry
java.lang.Object
java.lang.Record
software.coley.sourcesolver.resolve.entry.BasicPrimitiveEntry
- All Implemented Interfaces:
DescribableEntry,PrimitiveEntry
public record BasicPrimitiveEntry(@Nonnull PrimitiveEntry.Kind kind, @Nonnull String descriptor)
extends Record
implements PrimitiveEntry
-
Nested Class Summary
Nested classes/interfaces inherited from interface software.coley.sourcesolver.resolve.entry.PrimitiveEntry
PrimitiveEntry.Kind -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBasicPrimitiveEntry(PrimitiveEntry.Kind kind, String descriptor) Creates an instance of aBasicPrimitiveEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptorrecord component.final booleanIndicates whether some other object is "equal to" this one.getKind()final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.coley.sourcesolver.resolve.entry.DescribableEntry
toArrayEntryMethods inherited from interface software.coley.sourcesolver.resolve.entry.PrimitiveEntry
isAssignableFrom, isAssignableFrom
-
Constructor Details
-
BasicPrimitiveEntry
Creates an instance of aBasicPrimitiveEntryrecord class.- Parameters:
kind- the value for thekindrecord componentdescriptor- the value for thedescriptorrecord component
-
-
Method Details
-
getKind
- Specified by:
getKindin interfacePrimitiveEntry- Returns:
- Primitive kind.
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribableEntry- Returns:
- Type descriptor of this entry.
-
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
public final int 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. All components in this record class are compared withObjects::equals(Object,Object). -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
descriptor
Returns the value of thedescriptorrecord component.- Returns:
- the value of the
descriptorrecord component
-