csheets.ext.assertion
Class AssertionWarning

java.lang.Object
  extended by csheets.ext.assertion.AssertionWarning
All Implemented Interfaces:
Serializable

public class AssertionWarning
extends Object
implements Serializable

This class contains information about a warning in an assertion. A warning denotes a possible inconsistency or incorrectens in an assertion. Objects of this type are returned by Assertion.getWarnings()

Author:
Peter Palotas
See Also:
Assertion, Serialized Form

Nested Class Summary
static class AssertionWarning.Type
          Denotes the type of a warning.
 
Constructor Summary
AssertionWarning(AssertionWarning.Type type, Interval i1, Interval i2)
          Constructor.
 
Method Summary
 Interval getI1()
          Returns the first interval involved in this warning.
 Interval getI2()
          Returns the second interval involved in this warning.
 AssertionWarning.Type getType()
          Returns the type of this warning.
 String toString()
          Returns a message in english describing the conflict represented by this warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssertionWarning

public AssertionWarning(AssertionWarning.Type type,
                        Interval i1,
                        Interval i2)
Constructor.

Parameters:
type - Either INTERSECTING meaning that i1 and i2 intersects, ENCLOSING meaning that i2 is completely enclosed by i1 or EXCLUDING meaning that i2 is completely excluded by i1.
i1 - One of the intervals of the conflict.
i2 - The other interval of the conflict.
Method Detail

toString

public String toString()
Returns a message in english describing the conflict represented by this warning.

Overrides:
toString in class Object

getType

public AssertionWarning.Type getType()
Returns the type of this warning.

Returns:
the type of this warning.

getI1

public Interval getI1()
Returns the first interval involved in this warning.

Returns:
the first interval involved in this warning.

getI2

public Interval getI2()
Returns the second interval involved in this warning.

Returns:
the second interval involved in this warning.