Example usage for org.joda.time Duration toString

List of usage examples for org.joda.time Duration toString

Introduction

In this page you can find the example usage for org.joda.time Duration toString.

Prototype

@ToString
public String toString() 

Source Link

Document

Gets the value as a String in the ISO8601 duration format including only seconds and milliseconds.

Usage

From source file:org.apache.abdera2.activities.io.gson.DurationAdapter.java

License:Apache License

protected String serialize(Duration t) {
    return t.toString();
}

From source file:org.datanucleus.store.types.jodatime.converters.JodaDurationStringConverter.java

License:Open Source License

public String toDatastoreType(Duration dur) {
    return dur != null ? dur.toString() : null;
}

From source file:org.jadira.usertype.dateandtime.joda.columnmapper.BigIntegerColumnDurationMapper.java

License:Apache License

@Override
public String toNonNullString(Duration value) {
    return value.toString();
}

From source file:org.jadira.usertype.dateandtime.joda.columnmapper.StringColumnDurationMapper.java

License:Apache License

@Override
public String toNonNullValue(Duration value) {
    return value.toString();
}

From source file:org.ldp4j.application.data.Literals.java

License:Apache License

public static DurationLiteral of(javax.xml.datatype.Duration duration) {
    checkNotNull(duration, DURATION_CANNOT_BE_NULL);
    Period period = ISOPeriodFormat.standard().parsePeriod(duration.toString());
    return new ImmutableDurationLiteral(period.toStandardDuration(), Datatypes.DURATION);
}

From source file:org.ldp4j.application.sdk.internal.JodaDurationObjectFactory.java

License:Apache License

@Override
public String toString(Duration value) {
    return value.toString();
}

From source file:org.springframework.format.datetime.joda.DurationFormatter.java

License:Apache License

@Override
public String print(Duration object, Locale locale) {
    return object.toString();
}

From source file:org.supercsv.cellprocessor.joda.FmtDuration.java

License:Apache License

/**
 * {@inheritDoc}// w  w  w  . ja v  a  2 s . com
 * 
 * @throws SuperCsvCellProcessorException
 *             if value is null or not a Duration
 */
public Object execute(final Object value, final CsvContext context) {
    validateInputNotNull(value, context);
    if (!(value instanceof Duration)) {
        throw new SuperCsvCellProcessorException(Duration.class, value, context, this);
    }
    final Duration duration = (Duration) value;
    final String result = duration.toString();
    return next.execute(result, context);
}