org.helidb.lang
Class Record<K,V>

java.lang.Object
  extended by org.helidb.lang.Record<K,V>
Type Parameters:
K - The type of the record's key.
V - The type of the record's value.

public class Record<K,V>
extends Object

This object represents a database record, i.e. a key and a value.

An instance of this class is immutable. However, its key or value may be mutable, and clients should make sure not to modify them.

Since:
1.0
Author:
Karl Gustafsson
In_jar:
helidb-core

Constructor Summary
Record(K key, V value)
          Create a new record.
 
Method Summary
 boolean equals(Object o)
           
 K getKey()
          Get the record's key.
 V getValue()
          Get the record's value.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Record

public Record(K key,
              V value)
Create a new record.

Parameters:
key - The key.
value - The value.
Method Detail

getKey

public K getKey()
Get the record's key. Clients should regard the returned key as read only.

Returns:
The record's key.

getValue

public V getValue()
Get the record's value. Clients should regard the returned value as read only.

Returns:
The record's value.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object