Package com.facebook.presto.jdbc.internal.joda.time

Examples of com.facebook.presto.jdbc.internal.joda.time.Interval


            case VALUE_STRING:
               String v = jsonParser.getText();
                int dashIndex = v.indexOf('-');
                long start = Long.valueOf(v.substring(0, dashIndex));
                long end = Long.valueOf(v.substring(dashIndex + 1));
                return new Interval(start, end);
        }
        throw deserializationContext.mappingException("expected JSON String");
    }
View Full Code Here


     *
     * @param startInstant  the instant to start the interval at, null means now
     * @return an Interval starting at the specified instant
     */
    public Interval toIntervalFrom(ReadableInstant startInstant) {
        return new Interval(startInstant, this);
    }
View Full Code Here

     *
     * @param endInstant  the instant to end the interval at, null means now
     * @return an Interval ending at the specified instant
     */
    public Interval toIntervalTo(ReadableInstant endInstant) {
        return new Interval(this, endInstant);
    }
View Full Code Here

     * Get this interval as an immutable <code>Interval</code> object.
     *
     * @return the interval as an Interval object
     */
    public Interval toInterval() {
        return new Interval(getStartMillis(), getEndMillis(), getChronology());
    }
View Full Code Here

     */
    public Interval toInterval() {
        DateTimeField field = getField();
        long start = field.roundFloor(getMillis());
        long end = field.add(start, 1);
        Interval interval = new Interval(start, end);
        return interval;
    }
View Full Code Here

     * Get this interval as an immutable <code>Interval</code> object.
     *
     * @return the interval as an Interval object
     */
    public Interval toInterval() {
        return new Interval(getStartMillis(), getEndMillis(), getChronology());
    }
View Full Code Here

        if (jsonParser.getCurrentToken() == JsonToken.VALUE_STRING) {
            String v = jsonParser.getText();
            int dashIndex = v.indexOf('-');
            long start = Long.valueOf(v.substring(0, dashIndex));
            long end = Long.valueOf(v.substring(dashIndex + 1));
            return new Interval(start, end);
        }
        throw deserializationContext.mappingException("expected JSON String");
    }
View Full Code Here

     *
     * @param startInstant  the instant to start the interval at, null means now
     * @return an Interval starting at the specified instant
     */
    public Interval toIntervalFrom(ReadableInstant startInstant) {
        return new Interval(startInstant, this);
    }
View Full Code Here

     *
     * @param endInstant  the instant to end the interval at, null means now
     * @return an Interval ending at the specified instant
     */
    public Interval toIntervalTo(ReadableInstant endInstant) {
        return new Interval(this, endInstant);
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.jdbc.internal.joda.time.Interval

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.