|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--searchDesign.StorageTable
eine moegliche Datenstruktur Ich benutze - wie auf dem letzten Aufgabenblatt der woechentlichen Seminar-Aufgaben vorgeschlagen - einen geaenderten Quelltext der Klasse java.util.Hashtable im wesentlichen war eine aenderung notwendig: die table muss in der Lage sein, zu akkumulieren (DD im Index, positionen und spaces in KD)
Constructor Summary | |
StorageTable()
Constructs a new, empty StorageTable with a default capacity and load factor, which is 0.75. |
|
StorageTable(int initialCapacity)
Constructs a new, empty StorageTable with the specified initial capacity and default load factor, which is 0.75. |
|
StorageTable(int initialCapacity,
float loadFactor)
Constructs a new, empty StorageTable with the specified initial capacity and the specified load factor. |
|
StorageTable(java.util.Map t)
Constructs a new StorageTable with the same mappings as the given Map. |
Method Summary | |
Data[] |
asDataArray()
Erzeugt aus der Datenstruktur ein Array mit Data-Objekten und gibt dieses zurück. |
void |
clear()
Clears this StorageTable so that it contains no keys. |
java.lang.Object |
clone()
Creates a shallow copy of this StorageTable. |
boolean |
contains(java.lang.Object value)
Tests if some key maps into the specified value in this StorageTable. |
boolean |
containsKey(java.lang.Object key)
Tests if the specified object is a key in this StorageTable. |
boolean |
containsValue(java.lang.Object value)
Returns true if this StorageTable maps one or more keys to this value. Note that this method is identical in functionality to contains (which predates the Map interface). |
java.util.Enumeration |
elements()
Returns an enumeration of the values in this StorageTable. |
java.lang.Object |
get(java.lang.Object key)
Returns the value to which the specified key is mapped in this StorageTable. |
boolean |
isEmpty()
Tests if this StorageTable maps no keys to values. |
java.util.Enumeration |
keys()
Returns an enumeration of the keys in this StorageTable. |
void |
put(Data newData)
Fügt newData in die Direktzugriffsstruktur ein. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
die put() von Sun, ausser aenderung im falle von identischem key, hier nicht element in der liste ersetzen mit neuem, sondern akkumulieren durch die add() von Data (d.h entweder DocumentData oder Spaces und Positions) |
void |
putAll(java.util.Map t)
Copies all of the mappings from the specified Map to this StorageTable These mappings will replace any mappings that this StorageTable had for any of the keys currently in the specified Map. |
protected void |
rehash()
Increases the capacity of and internally reorganizes this StorageTable, in order to accommodate and access its entries more efficiently. |
java.lang.Object |
remove(java.lang.Object key)
Removes the key (and its corresponding value) from this StorageTable. |
int |
size()
Returns the number of keys in this StorageTable. |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public StorageTable(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacity of the StorageTable.loadFactor
- the load factor of the StorageTable.public StorageTable(int initialCapacity)
initialCapacity
- the initial capacity of the StorageTable.public StorageTable()
public StorageTable(java.util.Map t)
t
- the map whose mappings are to be placed in this map.Method Detail |
public void put(Data newData)
newData
- Das neu einzufügende Data-Objektpublic Data[] asDataArray()
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
key
- der key unter dem gespeichert wirdvalue
- der zu speichernde wertpublic int size()
public boolean isEmpty()
true
if this StorageTable maps no keys to values;
false
otherwise.public java.util.Enumeration keys()
Enumeration
,
elements()
,
#keySet()
,
Map
public java.util.Enumeration elements()
Enumeration
,
keys()
,
#values()
,
Map
public boolean contains(java.lang.Object value)
containsKey
method.Note that this method is identical in functionality to containsValue, (which is part of the Map interface in the collections framework).
value
- a value to search for.true
if and only if some key maps to the
value
argument in this StorageTable as
determined by the equals method;
false
otherwise.null
.containsKey(Object)
,
containsValue(Object)
,
Map
public boolean containsValue(java.lang.Object value)
Note that this method is identical in functionality to contains (which predates the Map interface).
value
- value whose presence in this StorageTable is to be tested.Map
public boolean containsKey(java.lang.Object key)
key
- possible key.true
if and only if the specified object
is a key in this StorageTable, as determined by the
equals method; false
otherwise.contains(Object)
public java.lang.Object get(java.lang.Object key)
key
- a key in the StorageTable.null
if the key is not mapped to any value in
this StorageTable.put(Object, Object)
protected void rehash()
public java.lang.Object remove(java.lang.Object key)
key
- the key that needs to be removed.null
if the key did not have a mapping.public void putAll(java.util.Map t)
t
- Mappings to be stored in this map.public void clear()
public java.lang.Object clone()
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |