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 booleangetBoolean(java.lang.Object key)intgetInt(java.lang.Object key)longgetLong(java.lang.Object key)intgetTypeFormatId()Get the formatID which corresponds to this class.java.lang.Objectput(java.lang.Object key, java.lang.Object value)Our special put method that wont barf on a null value.voidputBoolean(java.lang.Object key, boolean value)voidputInt(java.lang.Object key, int value)voidputLong(java.lang.Object key, long value)voidreadExternal(java.io.ObjectInput in)Read the hash table from a stream of stored objects.voidwriteExternal(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:
putin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
putin 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.IOExceptionWrite the hash table out. Step through the enumeration and write the strings out in UTF.- Specified by:
writeExternalin 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.ClassNotFoundExceptionRead the hash table from a stream of stored objects.- Specified by:
readExternalin 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:
getTypeFormatIdin interfaceTypedFormat- Returns:
- the formatID of this class
-
-