java.lang.Object
java.lang.Record
software.sava.core.accounts.token.Token2022Account
- All Implemented Interfaces:
Serializable
public record Token2022Account(TokenAccount tokenAccount, AccountType type, Map<ExtensionType,TokenExtension> extensions)
extends Record
implements Serializable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionToken2022Account(TokenAccount tokenAccount, AccountType type, Map<ExtensionType, TokenExtension> extensions) Creates an instance of aToken2022Accountrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theextensionsrecord component.final inthashCode()Returns a hash code value for this object.intl()static Token2022AccountReturns the value of thetokenAccountrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.intwrite(byte[] data, int offset) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.sava.core.serial.Serializable
reusable, write, write
-
Field Details
-
FACTORY
-
-
Constructor Details
-
Token2022Account
public Token2022Account(TokenAccount tokenAccount, AccountType type, Map<ExtensionType, TokenExtension> extensions) Creates an instance of aToken2022Accountrecord class.- Parameters:
tokenAccount- the value for thetokenAccountrecord componenttype- the value for thetyperecord componentextensions- the value for theextensionsrecord component
-
-
Method Details
-
read
-
l
public int l()- Specified by:
lin interfaceSerializable
-
write
public int write(byte[] data, int offset) - Specified by:
writein interfaceSerializable
-
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). -
tokenAccount
Returns the value of thetokenAccountrecord component.- Returns:
- the value of the
tokenAccountrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
extensions
Returns the value of theextensionsrecord component.- Returns:
- the value of the
extensionsrecord component
-