generator.data
Class IntervalListNoUnion

java.lang.Object
  extended by generator.data.IntervalListNoUnion

public class IntervalListNoUnion
extends java.lang.Object

Interval List No Union

This list contains several IntervalNoUnion. It is based on the IntervalList class, but unlike its sibbling, no union is attempted when an interval is added. This is necessary because X and Y contains several contiguous intervals. If X and Y were to be united, both X and Y would be equal to the state space.

Copyright(c) 2005 Université Laval, LSFM research group.

Version:
1.2
Author:
Frédérick Lemay

Constructor Summary
IntervalListNoUnion()
          Default constructor ... creates an empty list
 
Method Summary
 void addInterval(IntervalNoUnion i)
          Adds an interval to the list
 IntervalNoUnion getIntervalAt(int position)
          Fetch the IntervalNoUnion at the specified index.
 int getSize()
          Returns the number of intervals included in the list.
 void write(java.io.BufferedWriter output)
          Write the current transition list to the disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntervalListNoUnion

public IntervalListNoUnion()
Default constructor ... creates an empty list

Method Detail

getIntervalAt

public IntervalNoUnion getIntervalAt(int position)
                              throws IntervalNoUnionException
Fetch the IntervalNoUnion at the specified index.

Parameters:
position - the index of the interval to fetch.
Returns:
the requested interval.
Throws:
IntervalNoUnionException - should the index be out of bound.

getSize

public int getSize()
Returns the number of intervals included in the list.

Returns:
the number of intervals included in the list.

write

public void write(java.io.BufferedWriter output)
Write the current transition list to the disk. This function is used to correct a bug in the JAVA implementation. Using a string buffer to write the list to the disk is really slow.

Parameters:
output - an open writing buffer

addInterval

public void addInterval(IntervalNoUnion i)
Adds an interval to the list

Parameters:
i - the interval to add