org.weblab_project.core.util
Class SegmentUtil

java.lang.Object
  extended by org.weblab_project.core.util.SegmentUtil

public class SegmentUtil
extends java.lang.Object

A Util class for handling segments. It provide a method to test inclusion of Segments.

Author:
EADS WebLab Team
To do:
The comparison of SpatialSegments is not yet implemented.
Date:
2008-05-02

Method Summary
static boolean isIncluded(org.weblab_project.core.model.Segment theSegment, org.weblab_project.core.model.Segment inThisSegment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isIncluded

public static boolean isIncluded(org.weblab_project.core.model.Segment theSegment,
                                 org.weblab_project.core.model.Segment inThisSegment)
Parameters:
theSegment - Segment to test "be included" by inThisSegment.
inThisSegment - Segment to test "includes" theSegment.
Returns:
false if one Segment is null, or if the Segments aren't of the same Segment type, or if according to their type theSegment isn't included in inThisSegment; true if they are included.
WARNING:
If one of the segments in parameter is from an unknown type (i.e. neither Linear, nor Spatial, nor Temporal, a RuntimeException may be thrown!!!, Today if segments are spatial, a runtime exception will be thrown.


Copyright © 2004-2009. All Rights Reserved.