package vassistent.model;

import java.time.LocalDateTime;

/**
 * Immutable chart data point containing timestamp and ratio value.
 */
public class RatioPoint {

    private final LocalDateTime timestamp;
    private final double ratio;


    /**
     * Creates an immutable ratio point for chart rendering.
     *
     * @param timestamp timestamp associated with the ratio
     * @param ratio ratio value in range {@code [0, 1]}
     */
    public RatioPoint(LocalDateTime timestamp, double ratio) {
        this.timestamp = timestamp;
        this.ratio = ratio;
    }

    /**
     * Returns the ratio timestamp.
     *
     * @return point timestamp
     */
    public LocalDateTime getTimestamp() {
        return timestamp;
    }

    /**
     * Returns the ratio value.
     *
     * @return ratio for this point
     */
    public double getRatio() {
        return ratio;
    }
}
