org.optaplanner.examples.common.experimental.impl.BreakImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of optaplanner-examples Show documentation
Show all versions of optaplanner-examples Show documentation
OptaPlanner solves planning problems.
This lightweight, embeddable planning engine implements powerful and scalable algorithms
to optimize business resource scheduling and planning.
This module contains the examples which demonstrate how to use it in a normal Java application.
package org.optaplanner.examples.common.experimental.impl;
import org.optaplanner.examples.common.experimental.api.Break;
import org.optaplanner.examples.common.experimental.api.Sequence;
final class BreakImpl>
implements Break {
private Sequence previousSequence;
private Sequence nextSequence;
private Difference_ length;
BreakImpl(Sequence previousSequence, Sequence nextSequence,
Difference_ length) {
this.previousSequence = previousSequence;
this.nextSequence = nextSequence;
this.length = length;
}
@Override
public Sequence getPreviousSequence() {
return previousSequence;
}
@Override
public Sequence getNextSequence() {
return nextSequence;
}
@Override
public Difference_ getLength() {
return length;
}
void setPreviousSequence(Sequence previousSequence) {
this.previousSequence = previousSequence;
}
void setNextSequence(Sequence nextSequence) {
this.nextSequence = nextSequence;
}
void setLength(Difference_ length) {
this.length = length;
}
@Override
public String toString() {
return "Break{" +
"previousSequence=" + previousSequence +
", nextSequence=" + nextSequence +
", length=" + length +
'}';
}
}