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

org.jvirtanen.parity.match.Order Maven / Gradle / Ivy

The newest version!
package org.jvirtanen.parity.match;

class Order {

    private Level parent;

    private long id;

    private long remainingQuantity;

    public Order(Level parent, long id, long size) {
        this.parent = parent;

        this.id = id;

        this.remainingQuantity = size;
    }

    public long getId() {
        return id;
    }

    public long getRemainingQuantity() {
        return remainingQuantity;
    }

    public void reduce(long quantity) {
        remainingQuantity -= quantity;
    }

    public void resize(long size) {
        remainingQuantity = size;
    }

    public void delete() {
        parent.delete(this);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy