27 lines
606 B
Java
27 lines
606 B
Java
|
package visualizationElements;
|
||
|
|
||
|
/**
|
||
|
* Represents a hash table to visualize hash algorithms.
|
||
|
* @author MSchaefer
|
||
|
*
|
||
|
*/
|
||
|
public class Hashtable extends Table {
|
||
|
|
||
|
private static final String OBJECT_CAPTION = "Object";
|
||
|
private static final String HASHVALUE_CAPTION = "Hashvalue";
|
||
|
|
||
|
/**
|
||
|
* Creates a new Hashtable.
|
||
|
* @param values The values to display in the hash table.
|
||
|
*/
|
||
|
public Hashtable(Object[][] values){
|
||
|
super(values, 2, values[0].length);
|
||
|
|
||
|
String[] captions = new String[2];
|
||
|
captions[0] = HASHVALUE_CAPTION;
|
||
|
captions[1] = OBJECT_CAPTION;
|
||
|
|
||
|
super.setColumnCaptions(captions);
|
||
|
}
|
||
|
}
|