X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Futil%2FHash.java;h=40729d82b0a8676f1bb6281d4c4553d16f88ce34;hb=7692163af9dabe885650e977d5844f38d404d8b3;hp=6952e827021af0c7104cff0e5e38cae0d870c268;hpb=e1076a62356975f3b8c308146185fefd0e23fa2d;p=org.ibex.util.git diff --git a/src/org/ibex/util/Hash.java b/src/org/ibex/util/Hash.java index 6952e82..40729d8 100644 --- a/src/org/ibex/util/Hash.java +++ b/src/org/ibex/util/Hash.java @@ -1,9 +1,6 @@ -// Copyright (C) 2003 Adam Megacz all rights reserved. -// -// You may modify, copy, and redistribute this code under the terms of -// the GNU Library Public License version 2.1, with the exception of -// the portion of clause 6a after the semicolon (aka the "obnoxious -// relink clause") +// Copyright 2000-2005 the Contributors, as shown in the revision logs. +// Licensed under the Apache Public Source License 2.0 ("the License"). +// You may not use this file except in compliance with the License. package org.ibex.util; @@ -17,6 +14,9 @@ import java.util.*; * Not threadsafe. */ public class Hash implements java.io.Serializable { + + public static final long serialVersionUID = 8177551301264350283L; + /** this object is inserted as key in a slot when the * corresponding value is removed -- this ensures that the * probing sequence for any given key remains the same even if @@ -46,6 +46,26 @@ public class Hash implements java.io.Serializable { /** the number of entries with a non-null value */ public int size() { return size; } + public Object[] dumpkeys() { + return dumpkeys(new Object[size]); + } + public Object[] dumpkeys(Object[] ret) { + int j = 0; + for(int i=0; i