Rimosso ArraySequenceFake. Implementato positions() in NodePositionList. Creato il DefaultComparator. Prima implementazione di SortedPriorityList
This commit is contained in:
37
priorityqueue/MyEntry.java
Normal file
37
priorityqueue/MyEntry.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package priorityqueue;
|
||||
|
||||
/**
|
||||
* Created with MONSTER.
|
||||
* User: xgiovio
|
||||
* Date: 01/04/2014
|
||||
* Time: 21:00
|
||||
*/
|
||||
public class MyEntry<K,V> implements Entry<K,V> {
|
||||
|
||||
public MyEntry(K a, V b){
|
||||
key = a;
|
||||
value = b;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public K getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ("" + key + " - " + value);
|
||||
}
|
||||
|
||||
private K key;
|
||||
private V value;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user