public void conditionnalAdd(int n, ArrayList<MyNode> list){
		if (list.size()<n)
			list.add(this);
		else {
			MyNode minRef = list.get(0);
			int min = minRef.getValue();
			for (MyNode node : list){
				if (node.getValue()<min) {
					minRef = node;
					min = node.getValue();
				}
			}
			if (this.getValue()>min) {
				list.remove(minRef);
				list.add(this);
			}
		}
	}