exo 4 fin du tp generecite
This commit is contained in:
31
DEV.3.2/TP/TP1-Generecite/Association.java
Normal file
31
DEV.3.2/TP/TP1-Generecite/Association.java
Normal file
@@ -0,0 +1,31 @@
|
||||
public class Association<E> {
|
||||
private E element;
|
||||
private int frequence;
|
||||
|
||||
public Association(E element, int frequence) {
|
||||
this.element = element;
|
||||
this.frequence = frequence;
|
||||
}
|
||||
|
||||
public E getElement() {
|
||||
return element;
|
||||
}
|
||||
|
||||
public void setElement(E elt) {
|
||||
this.element = elt;
|
||||
}
|
||||
|
||||
public int getFrequence() {
|
||||
return frequence;
|
||||
}
|
||||
|
||||
public void setFrequence(int f) {
|
||||
this.frequence = f;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Association [element=" + element + ", frequence=" + frequence + "]";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user