All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.optaplanner.examples.common.experimental.impl.BreakImpl Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 9.44.0.Final
Show newest version
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 +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy