Package org.apache.axis2.databinding.types

Examples of org.apache.axis2.databinding.types.Duration


    public static double compare(BigDecimal binBigDecimal, String value) {
        return binBigDecimal.doubleValue() - Double.parseDouble(value);
    }

    public static long compare(Duration duration, String value) {
        Duration compareValue = new Duration(value);
        return duration.compare(compareValue);
    }
View Full Code Here


    public static Day convertTogDay(String s) {
        return new Day(s);
    }

    public static Duration convertToduration(String s) {
        return new Duration(s);
    }
View Full Code Here

    }

    // TODO: explain what this test has to do with "DecimalTest"???
    public void testDuration(){
        Calendar calendar = Calendar.getInstance();
        Duration duration = new Duration(false,0,0,23,12,24,23.45);
        System.out.println("Duration ==> " + duration.toString());
        // P2007Y5M30DT8H40M55.87S
        // "\\-?P(\\d*D)?(T(\\d*H)?(\\d*M)?(\\d*(\\.\\d*)?S)?)?"
        if (duration.toString().matches("\\-?P(\\d*D)?(T(\\d*H)?(\\d*M)?(\\d*(\\.\\d*)?S)?)?")){
            System.out.println("Matches");
        }
    }
View Full Code Here

            checkValue(xmlString[i],values[i]);
        }
    }

    protected void compare(String val1, String val2) {
        assertTrue(new  Duration(val1).equals(new Duration(val2)));
    }
View Full Code Here

    public static Duration convertToDuration(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Duration(s);
    }
View Full Code Here

    public static double compare(BigDecimal binBigDecimal, String value) {
        return binBigDecimal.doubleValue() - Double.parseDouble(value);
    }

    public static long compare(Duration duration, String value) {
        Duration compareValue = new Duration(value);
        return duration.compare(compareValue);
    }
View Full Code Here

            checkValue(xmlString[i],values[i]);
        }
    }

    protected void compare(String val1, String val2) {
        assertTrue(new  Duration(val1).equals(new Duration(val2)));
    }
View Full Code Here

    public static Duration convertToDuration(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Duration(s);
    }
View Full Code Here

    public static double compare(BigDecimal binBigDecimal, String value) {
        return binBigDecimal.doubleValue() - Double.parseDouble(value);
    }

    public static long compare(Duration duration, String value) {
        Duration compareValue = new Duration(value);
        return duration.compare(compareValue);
    }
View Full Code Here

    public static Duration convertToDuration(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Duration(s);
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.databinding.types.Duration

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.