Package org.opengis.temporal

Examples of org.opengis.temporal.RelativePosition


public abstract class DefaultTemporalPrimitive extends DefaultTemporalObject implements TemporalPrimitive, TemporalOrder, Comparable<TemporalPrimitive> {

    public int compareTo(TemporalPrimitive that) {
    if (that==null)
      throw new IllegalArgumentException("Provided temporal object is null");
    final RelativePosition pos= this.relativePosition(that);
    if(pos==null)
      throw new ClassCastException("The provided object cannot be compared to this one");
    if(pos==RelativePosition.BEFORE)
      return -1;
    if(pos==RelativePosition.AFTER)
View Full Code Here


       
        if (left == null || right == null) {
            return false;
        }
       
        RelativePosition pos = left.relativePosition(right);
        return pos != null && doEvaluate(pos);
    }
View Full Code Here

        //relative position between Instant objects
        cal.set(2000, 0, 1);
        Position position = new DefaultPosition(cal.getTime());
        other = new DefaultInstant(position);
        RelativePosition result = temporalPrimitive1.relativePosition(other);
        assertFalse(temporalPrimitive2.relativePosition(other).equals(result));

        //relative position between Instant and Period
        Instant instant1 = new DefaultInstant(new DefaultPosition(cal.getTime()));
        Instant instant2 = (DefaultInstant) temporalPrimitive2;
View Full Code Here

TOP

Related Classes of org.opengis.temporal.RelativePosition

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.