de.aitools.aq.util
Class Record<V extends Value>
java.lang.Object
de.aitools.aq.util.Record<V>
public class Record<V extends Value>
- extends java.lang.Object
A class to represent a key/value pair with String
as the key type
and some derivative of Value
as the value type.
The reason why the interface Map.Entry
or AbstractMap.SimpleEntry
is not
used here is that these classes do not allow to modify the key part.
- Version:
- $Id: Record.java,v 1.3 2011/04/08 17:25:55 trenkman Exp $
- Author:
- martin.trenkmann@uni-weimar.de
Constructor Summary |
Record(java.lang.Class<V> clazz)
|
Record(java.lang.String key,
V value)
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
DELIMITER
public static final char DELIMITER
- See Also:
- Constant Field Values
Record
public Record(java.lang.Class<V> clazz)
Record
public Record(java.lang.String key,
V value)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
getKey
public java.lang.String getKey()
getValue
public V getValue()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
parseFrom
public boolean parseFrom(java.util.Scanner sc)
printTo
public java.io.PrintStream printTo(java.io.PrintStream ps)
printAsAsciiTo
public java.io.PrintStream printAsAsciiTo(java.io.PrintStream ps)
set
public void set(java.lang.String key,
V value)
setKey
public void setKey(java.lang.String key)
setValue
public void setValue(V value)