Class FormatableHashtable
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- org.apache.derby.iapi.services.io.FormatableHashtable
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.Object,java.lang.Object>
,Formatable
,TypedFormat
public class FormatableHashtable extends java.util.Hashtable<java.lang.Object,java.lang.Object> implements Formatable
A formatable holder for a java.util.Hashtable. Used to avoid serializing Properties.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FormatableHashtable()
Niladic constructor for formatable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBoolean(java.lang.Object key)
int
getInt(java.lang.Object key)
long
getLong(java.lang.Object key)
int
getTypeFormatId()
Get the formatID which corresponds to this class.java.lang.Object
put(java.lang.Object key, java.lang.Object value)
Our special put method that wont barf on a null value.void
putBoolean(java.lang.Object key, boolean value)
void
putInt(java.lang.Object key, int value)
void
putLong(java.lang.Object key, long value)
void
readExternal(java.io.ObjectInput in)
Read the hash table from a stream of stored objects.void
writeExternal(java.io.ObjectOutput out)
Write the hash table out.-
Methods inherited from class java.util.Hashtable
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
-
-
-
-
Method Detail
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
Our special put method that wont barf on a null value.- Specified by:
put
in interfacejava.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
put
in classjava.util.Hashtable<java.lang.Object,java.lang.Object>
- See Also:
Hashtable
-
putInt
public void putInt(java.lang.Object key, int value)
-
getInt
public int getInt(java.lang.Object key)
-
putLong
public void putLong(java.lang.Object key, long value)
-
getLong
public long getLong(java.lang.Object key)
-
putBoolean
public void putBoolean(java.lang.Object key, boolean value)
-
getBoolean
public boolean getBoolean(java.lang.Object key)
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
Write the hash table out. Step through the enumeration and write the strings out in UTF.- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Parameters:
out
- write bytes here- Throws:
java.io.IOException
- thrown on error
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
Read the hash table from a stream of stored objects.- Specified by:
readExternal
in interfacejava.io.Externalizable
- Parameters:
in
- read this.- Throws:
java.io.IOException
- thrown on errorjava.lang.ClassNotFoundException
- thrown on error
-
getTypeFormatId
public int getTypeFormatId()
Get the formatID which corresponds to this class.- Specified by:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- the formatID of this class
-
-