/* * [Reading.java] * * Summary: represents one day's reading to be graphed, e.g. hits, weight, body fat. * * Copyright: (c) 1995-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.5 2006-03-05 */ package com.mindprod.stats; import com.mindprod.common18.BigDate; /** * represents one day's reading to be graphed, e.g. hits, weight, body fat. * * @author Roedy Green, Canadian Mind Products * @version 1.5 2006-03-05 * @since 1995 */ final class Reading { /** * value of reading on that day */ public final double y; /** * ordinal day of reading */ public final int x; /** * constructor * * @param ordinal ordinal of date. * @param y value of reading on this day */ public Reading( final int ordinal, final double y ) { this.x = ordinal; this.y = y; } /** * returns yyyy-mm-dd:nnn * * @return date in ISO date format for display */ public String toString() { return new BigDate( x ) + ":" + y; } } // end Reading