Re: offset-based hash table for ASCII data
Mark Space <markspace@sbc.global.net> writes:
The OP wants the whole data structure, right down to the
pointer and the values used for hash codes.
The experimental GPL-library ?ram.jar? contains a serializer
(not tested, so it still might contain bugs):
public class Main
{ public static void main( final java.lang.String[] args )
{ final java.util.HashMap<java.lang.String,java.lang.Integer> hashMap
= new java.util.HashMap<java.lang.String,java.lang.Integer>();
hashMap.put( "a", 1 );
hashMap.put( "b", 2 );
java.lang.System.out.println
( new de.dclj.ram.notation.junobjects.Junobjects().dump( hashMap )); }}
< &objectmap
object =
< &java.util.HashMap
entrySet =
< >
loadFactor =
< &float 0.75 >
modCount =
< &int 2 >
size =
< &int 2 >
table =
< &[java.util.HashMap.Entry[]]
< null >
< null >
< null >
< null >
< &java.util.HashMap.Entry zz0 >
< null >
< null >
< &java.util.HashMap.Entry zz1 >
< null >
< null >
< null >
< null >
< null >
< null >
< null >
< null >>
threshold =
< &int 12 >>
zz0 =
< &java.util.HashMap.Entry
hash =
< &int 100 >
key =
< &java.lang.String zz2 >
next =
< >
value =
< &java.lang.Integer zz3 >>
zz1 =
< &java.util.HashMap.Entry
hash =
< &int 103 >
key =
< &java.lang.String zz4 >
next =
< >
value =
< &java.lang.Integer zz5 >>
zz2 =
< &java.lang.String
count =
< &int 1 >
hash =
< &int 98 >
offset =
< &int 0 >
value =
< &[char[]] b >>
zz3 =
< &java.lang.Integer
value =
< &int 2 >>
zz4 =
< &java.lang.String
count =
< &int 1 >
hash =
< &int 97 >
offset =
< &int 0 >
value =
< &[char[]] a >>
zz5 =
< &java.lang.Integer
value =
< &int 1 >>>
?Your wish is not granted unless it's a fish,
Your wish is not granted unless it's a dish,
A fish on a dish, is that what you wish??
-- The Incredible String Band