net.sourceforge.plantuml.bpm.Navigators Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.bpm;
public final class Navigators {
private Navigators() {
}
public static Navigator iterate(final Chain orig, final O from, final O to) {
if (orig.compare(from, to) <= 0) {
return orig.navigator(from);
}
return reverse(orig.navigator(from));
}
public static Navigator reverse(final Navigator orig) {
return new Navigator() {
public O next() {
return orig.previous();
}
public O previous() {
return orig.next();
}
public O get() {
return orig.get();
}
public void set(O data) {
orig.set(data);
}
public void insertBefore(O data) {
throw new UnsupportedOperationException();
}
public void insertAfter(O data) {
throw new UnsupportedOperationException();
}
};
}
}