Package org.jfree.data.time

Examples of org.jfree.data.time.FixedMillisecond


    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        FixedMillisecond m1 = new FixedMillisecond();
        FixedMillisecond m2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(m1);
View Full Code Here


   
    /**
     * Two objects that are equal are required to return the same hashCode.
     */
    public void testHashcode() {
        FixedMillisecond m1 = new FixedMillisecond(500000L);
        FixedMillisecond m2 = new FixedMillisecond(500000L);
        assertTrue(m1.equals(m2));
        int h1 = m1.hashCode();
        int h2 = m2.hashCode();
        assertEquals(h1, h2);
    }
View Full Code Here

    /**
     * The {@link FixedMillisecond} class is immutable, so should not be
     * {@link Cloneable}.
     */
    public void testNotCloneable() {
        FixedMillisecond m = new FixedMillisecond(500000L);
        assertFalse(m instanceof Cloneable);
    }
View Full Code Here

        try {
            pulseTimeSeries.clear();
            WatchDataSource pulse = service.fetch("pulse");
            for(Calculable c : pulse.getCalculable()) {
                lastPulse = (CalculablePatient)c;
                pulseTimeSeries.addOrUpdate(new FixedMillisecond(c.getWhen()), c.getValue());
            }
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        try {
            temperatureTimeSeries.clear();
            WatchDataSource temperature = service.fetch("temperature");
            for(Calculable c : temperature.getCalculable()) {
                lastTemperature = c;
                temperatureTimeSeries.add(new FixedMillisecond(c.getWhen()), c.getValue());
            }
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

            if(s!=null) {
                try {
                    CalculablePatient c = checkAdd(s, "pulse", lastPulse);
                    if(c!=null) {
                        lastPulse = c;
                        pulseTimeSeries.addOrUpdate(new FixedMillisecond(c.getWhen()), c.getValue());
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
                try {
                    Calculable c = checkAdd(s, "temperature", lastTemperature);
                    if(c!=null) {
                        lastTemperature = c;
                        temperatureTimeSeries.addOrUpdate(new FixedMillisecond(c.getWhen()), c.getValue());
                    }
                } catch (RemoteException e) {
                    e.printStackTrace();
                }
            }
View Full Code Here

TOP

Related Classes of org.jfree.data.time.FixedMillisecond

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.