java:generics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
java:generics [2015/03/16 06:36]
gthanos [Παραμετρικοί τύποι δεδομένων με πολλές παραμέτρους]
java:generics [2015/03/16 07:07]
gthanos [Παραμετρικοί τύποι δεδομένων με πολλές παραμέτρους]
Line 90: Line 90:
 } }
 </​code>​ </​code>​
- +public class OrderedPair<​K,​ V> implements ​Pair<​K,​V>​ {
-<code java OrderedPair.java>​ +
-public class Pair<K, V> {+
  
     private K key;     private K key;
     private V value;     private V value;
  
-    public ​Pair(K key, V value) {+    public ​OrderedPair(K key, V value) {
         this.key = key;         this.key = key;
         this.value = value;         this.value = value;
Line 107: Line 105:
     public V getValue() { return value; }     public V getValue() { return value; }
 } }
 +<code java OrderedPair.java>​
  
 </​code>​ </​code>​
java/generics.txt · Last modified: 2017/02/17 15:01 by gthanos