ewItems));
}
return newItems;
}
public List lt; Item gt; getItemsInstance () {
return items;
}
public void setEmpty () {. clear () ;. clear ();
}
/**
* @ return the paretoSet
*/
public List lt; List lt; Item gt; gt; getParetoSetInstance () {
return paretoSet;
}
/**
* @ return the paretoSet
*/
public List lt; List lt; Item gt; gt; getParetoSetClone () { lt; List lt; Item gt; gt; clone= new ArrayList lt; List lt; Item gt; gt; (); lt; SimpleEntry lt; String, String gt; gt; itemPairs= new ArrayList lt; SimpleEntry lt; String, String gt; gt; ();
for (List lt; Item gt; paretoLayer: paretoSet) { lt; Item gt; newParetoLayer= new ArrayList lt; Item gt; ();
for (Item i: paretoLayer) {. add (i. clone ());
if (i. hasPair ()) {. add ( new SimpleEntry lt; String, String gt; (i. getId (), i. getPair (). getId ()));
}
}. add (newParetoLayer);
}
for (Entry lt; String, String gt; e: itemPairs) {(e. getKey (), clone). setPair (getItemFromParetoSetByID (e. getValue (), clone));
}
return clone;
}
/**
* @ param paretoSet the paretoSet to set
*/
public void setParetoSet (List lt; List lt; Item gt; gt ; paretoSet) {
this . paretoSet=paretoSet;
}
private Item getItemFromListByID (String id, List lt; Item gt; items) {
for (Item i: items) {
if (i. getId (). equals (id)) {
return i;
}
}
return null ;
}
private Item getItemFromParetoSetByID (String id, List lt; List lt; Item gt; gt; paretoSet) {
for (List lt; Item gt; items: paretoSet) {
for (Item i: items) {
if (i. getId (). equals (id)) {
return i;
}
}
}
return null ;
}
/**
* @ return the map
*/
public SortedMap lt; Container, List lt; Item gt; gt; getMapInstance () {
return map;
}
/**
* @ return the map
*/
public SortedMap lt; Container, List lt; Item gt; gt; getMapClone ( int index) { lt; Container, List lt; Item gt; gt; clone= new TreeMap lt; Container, List lt; Item gt; gt; ( new MapKeysComparator (index)); lt; Entry lt; Container, List lt; Item gt; gt; gt; set=map. entrySet ();
for (Entry lt; Container, List lt; Item gt; gt; e: set) { lt; Item gt; items= new ArrayList lt; Item gt; ();
for (Item i: e. getValue ()) {. add (i. clone ());
}. put (e. getKey (). clone (), items);
}
return clone;
}
/**
* ...