com.tensegrity.composite.coordinate.range
Class RangeUtilities

java.lang.Object
  extended bycom.tensegrity.composite.coordinate.range.RangeUtilities

public class RangeUtilities
extends java.lang.Object

This class provides some general functionalities needed to work with CategoryRanges.

Version:
$Id: RangeUtilities.java,v 1.4 2005/04/01 15:45:16 MichaelKegel Exp $
Author:
MichaelKegel

Method Summary
static void insertRange(java.util.List ranges, CategoryRange range)
          Inserts the given CategoryRange into the given List of CategoryRanges.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

insertRange

public static final void insertRange(java.util.List ranges,
                                     CategoryRange range)
Inserts the given CategoryRange into the given List of CategoryRanges. The insertion follows the rules listet below.
  1. Ranges in the list, whose start value is overlapped by the range to insert, will be adjusted to the end value of the range to insert.
  2. Ranges in the list, whose end value is overlapped by the range to insert, will be adjusted to the start value of the range to insert.
  3. Ranges in the list, which are enclosed by the range to insert, will be eliminated.
  4. If the range to insert lies within a range in the list the range in the list is cutted into two ranges and their start and end value are adjusted to the start end end value of the range to insert.

Parameters:
ranges - the list of ranges to insert the given range into
range - the range to insert


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.