Record Class PrimitiveKiwiType
java.lang.Object
java.lang.Record
org.ethelred.kiwiproc.processor.types.PrimitiveKiwiType
- Record Components:
primitiveName-isNullable-
- All Implemented Interfaces:
KiwiType
public record PrimitiveKiwiType(String primitiveName, boolean isNullable)
extends Record
implements KiwiType
Represent the duality of primitive and boxed types.
-
Constructor Summary
ConstructorsConstructorDescriptionPrimitiveKiwiType(String primitiveName, boolean isNullable) Creates an instance of aPrimitiveKiwiTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisNullablerecord component.booleanisSimple()Returns the value of theprimitiveNamerecord component.toString()Returns a string representation of this record class.withIsNullable(boolean b)
-
Constructor Details
-
PrimitiveKiwiType
Creates an instance of aPrimitiveKiwiTyperecord class.- Parameters:
primitiveName- the value for theprimitiveNamerecord componentisNullable- the value for theisNullablerecord component
-
-
Method Details
-
packageName
- Specified by:
packageNamein interfaceKiwiType
-
className
-
isSimple
public boolean isSimple() -
withIsNullable
- Specified by:
withIsNullablein interfaceKiwiType
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
primitiveName
Returns the value of theprimitiveNamerecord component.- Returns:
- the value of the
primitiveNamerecord component
-
isNullable
public boolean isNullable()Returns the value of theisNullablerecord component.- Specified by:
isNullablein interfaceKiwiType- Returns:
- the value of the
isNullablerecord component
-