Module software.sava.core
Record Class AccountIndexLookupTableEntry
java.lang.Object
java.lang.Record
software.sava.core.accounts.lookup.AccountIndexLookupTableEntry
- All Implemented Interfaces:
Comparable<PublicKey>,PublicKey
-
Field Summary
Fields inherited from interface software.sava.core.accounts.PublicKey
MAX_SEED_LENGTH, MAX_SEEDS, NONE, PUBLIC_KEY_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionAccountIndexLookupTableEntry(byte[] publicKey, int index) Creates an instance of aAccountIndexLookupTableEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbyte[]booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.static intstatic byteindexOfOrThrow(Map<PublicKey, Integer> accountMap, PublicKey publicKey) static intlookupAccountIndex(AccountIndexLookupTableEntry[] lookupTable, PublicKey publicKey) static bytelookupAccountIndexOrThrow(AccountIndexLookupTableEntry[] lookupTable, PublicKey publicKey) byte[]Returns the value of thepublicKeyrecord component.toBase58()toBase64()byte[]toString()Returns a string representation of this record class.intwrite(byte[] out, int off) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.sava.core.accounts.PublicKey
l, toJavaPublicKey, verifySignature, verifySignature, verifySignature, verifySignature
-
Constructor Details
-
AccountIndexLookupTableEntry
public AccountIndexLookupTableEntry(byte[] publicKey, int index) Creates an instance of aAccountIndexLookupTableEntryrecord class.- Parameters:
publicKey- the value for thepublicKeyrecord componentindex- the value for theindexrecord component
-
-
Method Details
-
lookupAccountIndex
public static int lookupAccountIndex(AccountIndexLookupTableEntry[] lookupTable, PublicKey publicKey) -
lookupAccountIndexOrThrow
public static byte lookupAccountIndexOrThrow(AccountIndexLookupTableEntry[] lookupTable, PublicKey publicKey) -
indexOf
-
indexOfOrThrow
-
toByteArray
public byte[] toByteArray()- Specified by:
toByteArrayin interfacePublicKey
-
copyByteArray
public byte[] copyByteArray()- Specified by:
copyByteArrayin interfacePublicKey
-
compareTo
- Specified by:
compareToin interfaceComparable<PublicKey>
-
write
public int write(byte[] out, int off) -
toBase58
-
toBase64
-
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. -
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 '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
publicKey
public byte[] publicKey()Returns the value of thepublicKeyrecord component.- Returns:
- the value of the
publicKeyrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-