Package org.h2.value

Examples of org.h2.value.ValueTime.compareTo()


        assertFalse(d1 == d1b);
        assertTrue(d1.equals(d1));
        assertTrue(d1.equals(d1b));
        assertTrue(d1b.equals(d1));
        assertEquals(0, d1.compareTo(d1b, null));
        assertEquals(0, d1b.compareTo(d1, null));
        ValueDate d2 = ValueDate.parse("2002-02-02");
        assertFalse(d1.equals(d2));
        assertFalse(d2.equals(d1));
        assertEquals(-1, d1.compareTo(d2, null));
        assertEquals(1, d2.compareTo(d1, null));
View Full Code Here


        assertEquals(0, d1b.compareTo(d1, null));
        ValueDate d2 = ValueDate.parse("2002-02-02");
        assertFalse(d1.equals(d2));
        assertFalse(d2.equals(d1));
        assertEquals(-1, d1.compareTo(d2, null));
        assertEquals(1, d2.compareTo(d1, null));

        // can't convert using java.util.Date
        assertEquals(
                Integer.MAX_VALUE + "-12-31 00:00:00.0",
                ValueDate.parse(Integer.MAX_VALUE + "-12-31").
View Full Code Here

        assertFalse(t1 == t1b);
        assertTrue(t1.equals(t1));
        assertTrue(t1.equals(t1b));
        assertTrue(t1b.equals(t1));
        assertEquals(0, t1.compareTo(t1b, null));
        assertEquals(0, t1b.compareTo(t1, null));
        ValueTime t2 = ValueTime.parse("22:22:22");
        assertFalse(t1.equals(t2));
        assertFalse(t2.equals(t1));
        assertEquals("33:33:33", t1.add(t2).getString());
        assertEquals("33:33:33", t1.multiply(ValueInt.get(4)).subtract(t1).getString());
View Full Code Here

        assertFalse(t1.equals(t2));
        assertFalse(t2.equals(t1));
        assertEquals("33:33:33", t1.add(t2).getString());
        assertEquals("33:33:33", t1.multiply(ValueInt.get(4)).subtract(t1).getString());
        assertEquals(-1, t1.compareTo(t2, null));
        assertEquals(1, t2.compareTo(t1, null));

        // can't convert using java.util.Date
        assertEquals(
                "1969-12-31 23:00:00.0",
                ValueTime.parse("-1:00:00").
View Full Code Here

        assertFalse(t1 == t1b);
        assertTrue(t1.equals(t1));
        assertTrue(t1.equals(t1b));
        assertTrue(t1b.equals(t1));
        assertEquals(0, t1.compareTo(t1b, null));
        assertEquals(0, t1b.compareTo(t1, null));
        ValueTimestamp t2 = ValueTimestamp.parse("2002-02-02 02:02:02.222");
        assertFalse(t1.equals(t2));
        assertFalse(t2.equals(t1));
        assertEquals(-1, t1.compareTo(t2, null));
        assertEquals(1, t2.compareTo(t1, null));
View Full Code Here

        assertEquals(0, t1b.compareTo(t1, null));
        ValueTimestamp t2 = ValueTimestamp.parse("2002-02-02 02:02:02.222");
        assertFalse(t1.equals(t2));
        assertFalse(t2.equals(t1));
        assertEquals(-1, t1.compareTo(t2, null));
        assertEquals(1, t2.compareTo(t1, null));
        t1 = ValueTimestamp.parse("2001-01-01 01:01:01.123456789");
        assertEquals("2001-01-01 01:01:01.123456789", t1.getString());
        assertEquals("2001-01-01 01:01:01.123456789", t1.convertScale(true, 10).getString());
        assertEquals("2001-01-01 01:01:01.123456789", t1.convertScale(true, 9).getString());
        assertEquals("2001-01-01 01:01:01.12345679", t1.convertScale(true, 8).getString());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.