RegisterSign In

API Documentation: Class Key

Package: com.mckoi.data
extends com.mckoi.data.AbstractKey

A Key is a reference in an address space that destinguishes one data file from another within a context. A key is an identity to some stored information.

All keys have a type, a secondary and primary component. In combination, the key is 14 bytes of information in total.

Keys with a type value of 0x07F80 are special case keys used for system specific information and should not be used by user structures.

Constructors Summary

Key(short type, int secondary_key, long primary_key)

Methods Summary

short getType()
int getSecondary()
long getPrimary()
long encodedValue(int n)
int compareTo(AbstractKey ob)
boolean equals(Object ob)
int hashCode()
String toString()

Constructor Details

Key(short type, int secondary_key, long primary_key)

Constructs the key with a key type (16 bits), a secondary key value (32 bits), and a primary key value (64 bits).

Method Details

short getType()

Returns the type of the key (16 bits).

int getSecondary()

Returns the secondary component of the key (32 bits).

long getPrimary()

Returns the primary component of the key (64 bits).

long encodedValue(int n)

Returns the encoded value for the nth part.

int compareTo(AbstractKey ob)

Compares this key with another key. Returns a positive number if this key is greater than the given key, a negative number if this key is less than the given key, and 0 if the keys are equal.

boolean equals(Object ob)

Returns true if the given key matches this key.

int hashCode()

Returns a hash code of the key.

String toString()

Returns a string representation of the key.

The text on this page is licensed under the Creative Commons Attribution 3.0 License. Java is a registered trademark of Oracle and/or its affiliates.
Mckoi is Copyright © 2000 - 2020 Diehl and Associates, Inc. All rights reserved.