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

org.optaplanner.constraint.streams.bavet.common.AggregatedTupleLifecycle 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 implementation of Constraint streams (Bavet).

There is a newer version: 10.0.0
Show newest version
package org.optaplanner.constraint.streams.bavet.common;

final class AggregatedTupleLifecycle implements TupleLifecycle {
    private final TupleLifecycle[] lifecycles;

    public AggregatedTupleLifecycle(TupleLifecycle[] lifecycles) {
        this.lifecycles = lifecycles;
    }

    @Override
    public void insert(Tuple_ tuple) {
        for (TupleLifecycle lifecycle : lifecycles) {
            lifecycle.insert(tuple);
        }
    }

    @Override
    public void update(Tuple_ tuple) {
        for (TupleLifecycle lifecycle : lifecycles) {
            lifecycle.update(tuple);
        }
    }

    @Override
    public void retract(Tuple_ tuple) {
        for (TupleLifecycle lifecycle : lifecycles) {
            lifecycle.retract(tuple);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy