/** * Returns the length of this TM_GeometricPrimitive * * @return */ public Duration length() { Duration response = null; long diff = 0L; if (this instanceof Instant) { response = new DefaultPeriodDuration(Math.abs(diff)); return response; } else { if (this instanceof Period) { if (((Period) this).getBeginning() != null && ((Period) this).getEnding() != null) { response = ((DefaultInstant) ((Period) this).getBeginning()) .distance(((DefaultInstant) ((Period) this).getEnding())); return response; } } return null; } } }
response = new DefaultPeriodDuration(Math.abs(diff)); return response;
@Before public void setUp() { periodDuration1 = new DefaultPeriodDuration( new SimpleInternationalString("5"), new SimpleInternationalString("2"), new SimpleInternationalString("1"), new SimpleInternationalString("12"), new SimpleInternationalString("15"), new SimpleInternationalString("5"), new SimpleInternationalString("23")); periodDuration2 = new DefaultPeriodDuration(1535148449548L); }
if (resolution != null) { buff.append(new DefaultPeriodDuration(resolution.longValue()).toString()); } else { if (values.size() >= 2 && allDates(values)) { buff.append(new DefaultPeriodDuration(durationInMilliSeconds).toString()); } else {
/** * Returns the length of this TM_GeometricPrimitive * @return */ public Duration length() { Duration response = null; long diff = 0L; if (this instanceof Instant) { response = new DefaultPeriodDuration(Math.abs(diff)); return response; } else { if (this instanceof Period) { if (((Period) this).getBeginning() != null && ((Period) this).getEnding() != null) { response = ((DefaultInstant) ((Period) this).getBeginning()).distance(((DefaultInstant) ((Period) this).getEnding())); return response; } } return null; } } }
/** * Returns the length of this TM_GeometricPrimitive * @return */ public Duration length() { Duration response = null; long diff = 0L; if (this instanceof Instant) { response = new DefaultPeriodDuration(Math.abs(diff)); return response; } else { if (this instanceof Period) { if (((Period) this).getBeginning() != null && ((Period) this).getEnding() != null) { response = ((DefaultInstant) ((Period) this).getBeginning()).distance(((DefaultInstant) ((Period) this).getEnding())); return response; } } return null; } } }
new DefaultPeriodDuration(resolution.longValue()).toString());
response = new DefaultPeriodDuration(Math.abs(diff)); return response;
response = new DefaultPeriodDuration(Math.abs(diff)); return response;