IobTotal implements DataPointWithLabelInterface { public IobTotal copy() { IobTotal i = new IobTotal(time); i.iob = iob; i.activity = activity; i.bolussnooze = bolussnooze; i.basaliob = basaliob; i.netbasalinsulin = netbasalinsulin; i.hightempinsulin = hightempinsulin; i.lastBolusTime = lastBolusTime; if (iobWithZeroTemp != null) i.iobWithZeroTemp = iobWithZeroTemp.copy(); i.netInsulin = netInsulin; i.netRatio = netRatio; i.extendedBolusInsulin = extendedBolusInsulin; return i; } IobTotal(long time); IobTotal copy(); IobTotal plus(IobTotal other); static IobTotal combine(IobTotal bolusIOB, IobTotal basalIob); IobTotal round(); JSONObject json(); JSONObject determineBasalJson(); @Override double getX(); @Override double getY(); @Override void setY(double y); @Override String getLabel(); @Override long getDuration(); @Override PointsWithLabelGraphSeries.Shape getShape(); @Override float getSize(); @Override int getColor(); IobTotal setColor(int color); public double iob; public double activity; public double bolussnooze; public double basaliob; public double netbasalinsulin; public double hightempinsulin; public long lastBolusTime; public IobTotal iobWithZeroTemp; public double netInsulin; public double netRatio; public double extendedBolusInsulin; }
@Test public void copytest() { IobTotal a = new IobTotal(now); a.iob = 10; IobTotal b = a.copy(); Assert.assertEquals(a.iob, b.iob, 0.01d); }