Entry.java 1.02 KB
package com.example.mina.entity;

/**
 * @author 杜云山
 * @date 2021/03/05
 */
public class Entry {

    private final int row;

    private final int col;

    private final String name;

    private int value;

    private final boolean booked;

    private final long timestamp;

    public static final Entry EMPTY = new Entry(0, 0, null, 0, false);

    public Entry(int row, int col, String name, int value, boolean booked) {
        this.row = row;
        this.col = col;
        this.name = name;
        this.value = value;
        this.booked = booked;
        this.timestamp = System.nanoTime();
    }

    public int getRow() {
        return row;
    }

    public int getCol() {
        return col;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public boolean isBooked() {
        return booked;
    }

    public void setValue(int v) {
        this.value = v;
    }

    public long getTimestamp() {
        return this.timestamp;
    }

}