|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.xosd.localallocmgr.basic.manipulators.TimeTableDefragmenter
public class TimeTableDefragmenter
Manipulator that combines the succeeding elements with the same attributes, which were made during different manipulations of the time table (adding, removing sequences). This manipulator is not needed for for the sake of the time table but to decrease the number of entries and to make the elms in the time table as close to the original reservation representation as possible.
Constructor Summary | |
---|---|
TimeTableDefragmenter()
|
Method Summary | |
---|---|
private static TTElm |
createReferentialElm(java.util.ArrayList<TTElm> selection,
int endpos)
returns defragmented object reference or null if something is wrong |
static boolean |
defragment(TimeTable tt)
|
static boolean |
defragment(TimeTable tt,
java.util.GregorianCalendar from,
java.util.GregorianCalendar to)
how to do: defragment anything between the given dates. defragmentation is done on the objects that hold exactly the same elements (attributes). |
private static int |
defragSelection(java.util.ArrayList<TTElm> selection,
TimeTable tt)
|
private static int |
endPosDefragmented(java.util.ArrayList<TTElm> selection)
returns the position of the last element in the selection that has the same attributes as the first element. returns -1 if no such element exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeTableDefragmenter()
Method Detail |
---|
public static boolean defragment(TimeTable tt)
public static boolean defragment(TimeTable tt, java.util.GregorianCalendar from, java.util.GregorianCalendar to)
private static TTElm createReferentialElm(java.util.ArrayList<TTElm> selection, int endpos) throws AttributeConformanceException
selection
- endpos
-
AttributeConformanceException
private static int defragSelection(java.util.ArrayList<TTElm> selection, TimeTable tt) throws AttributeConformanceException
AttributeConformanceException
private static int endPosDefragmented(java.util.ArrayList<TTElm> selection)
selection
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |