de.interactive_instruments.ShapeChange.Transformation.Profiling
Class VersionRange

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Transformation.Profiling.VersionRange

public class VersionRange
extends Object

Author:
Johannes Echterhoff (echterhoff interactive-instruments de)

Constructor Summary
VersionRange(VersionNumber begin, VersionNumber end)
           
 
Method Summary
 boolean after(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): After - self.begin.position > other.end.position
 boolean before(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Before - self.end.position < other.begin.position
 boolean begins(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Begins - self.begin.position = other.begin.position AND self.end.position < other.end.position
 boolean begunBy(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): BegunBy - self.begin.position = other.begin.position AND self.end.position > other.end.position
 boolean contains(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Contains - self.begin.position < other.begin.position AND self.end.position > other.end.position
 boolean containsNonStrict(VersionRange other)
          OR-combination of begunBy, contains, equals, endedBy: self.begin.position <= other.begin.position AND self.end.position >= other.end.position
 boolean during(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): During - self.begin.position > other.begin.position AND self.end.position < other.end.position
 boolean endedBy(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): EndedBy - self.begin.position < other.begin.position AND self.end.position = other.end.position
 boolean ends(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Ends - self.begin.position > other.begin.position AND self.end.position = other.end.position
 boolean equals(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Equals - self.begin.position = other.begin.position AND self.end.position = other.end.position
 boolean meets(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Meets - self.end.position = other.begin.position
 boolean metBy(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): MetBy - self.begin.position = other.end.position
 boolean overlappedBy(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): OverlappedBy - self.begin.position > other.begin.position AND self.begin.position < other.end.position AND self.end.position > other.end.position
 boolean overlaps(VersionRange other)
          Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Overlaps - self.begin.position < other.begin.position AND self.end.position > other.begin.position AND self.end.position < other.end.position
 String toString()
           
 VersionRange union(VersionRange other)
          Creates a new VersionRange that is the union of both this range and the other, iff this range is not before and not after the other.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VersionRange

public VersionRange(VersionNumber begin,
                    VersionNumber end)
Method Detail

before

public boolean before(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Before - self.end.position < other.begin.position

Parameters:
other -
Returns:
true if this version range is before the other, else false

meets

public boolean meets(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Meets - self.end.position = other.begin.position

Parameters:
other -
Returns:
true if this version range meets the other, else false

overlaps

public boolean overlaps(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Overlaps - self.begin.position < other.begin.position AND self.end.position > other.begin.position AND self.end.position < other.end.position

Parameters:
other -
Returns:
true if this version range overlaps the other, else false

begins

public boolean begins(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Begins - self.begin.position = other.begin.position AND self.end.position < other.end.position

Parameters:
other -
Returns:
true if this version range begins the other, else false

begunBy

public boolean begunBy(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): BegunBy - self.begin.position = other.begin.position AND self.end.position > other.end.position

Parameters:
other -
Returns:
true if this version range is begun by the other, else false

during

public boolean during(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): During - self.begin.position > other.begin.position AND self.end.position < other.end.position

Parameters:
other -
Returns:
true if this version range is during the other, else false

contains

public boolean contains(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Contains - self.begin.position < other.begin.position AND self.end.position > other.end.position

Parameters:
other -
Returns:
true if this version range contains the other, else false

containsNonStrict

public boolean containsNonStrict(VersionRange other)
OR-combination of begunBy, contains, equals, endedBy: self.begin.position <= other.begin.position AND self.end.position >= other.end.position

Parameters:
other -
Returns:
true if this version range contains the other (in a non-strict way, see method description), else false

equals

public boolean equals(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Equals - self.begin.position = other.begin.position AND self.end.position = other.end.position

Parameters:
other -
Returns:
true if this version range equals the other, else false

overlappedBy

public boolean overlappedBy(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): OverlappedBy - self.begin.position > other.begin.position AND self.begin.position < other.end.position AND self.end.position > other.end.position

Parameters:
other -
Returns:
true if this version range is overlapped by the other, else false

ends

public boolean ends(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): Ends - self.begin.position > other.begin.position AND self.end.position = other.end.position

Parameters:
other -
Returns:
true if this version range ends the other, else false

endedBy

public boolean endedBy(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): EndedBy - self.begin.position < other.begin.position AND self.end.position = other.end.position

Parameters:
other -
Returns:
true if this version range is ended by the other, else false

metBy

public boolean metBy(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): MetBy - self.begin.position = other.end.position

Parameters:
other -
Returns:
true if this version range is met by the other, else false

after

public boolean after(VersionRange other)
Uses the same expression as ISO 19108 (see TM_RelativePosition for time periods): After - self.begin.position > other.end.position

Parameters:
other -
Returns:
true if this version range is after the other, else false

union

public VersionRange union(VersionRange other)
Creates a new VersionRange that is the union of both this range and the other, iff this range is not before and not after the other.

Parameters:
other -
Returns:
the union of this and the other range or null if one is before the other

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015. All rights reserved.