public static enum RangeExtendedComparator.Result extends Enum<RangeExtendedComparator.Result>
Brian Hayes (2003) A lucid interval.The meaning of each of the four characters in the notation describing the comparison between interval X and interval Y is as follows:
American Scientist 91(6):484-488.Available at: http://www.cs.utep.edu/interval-comp/hayes.pdf
X <<=> Y means interval X starts below and extends to
the maximum of interval Y.| Enum Constant and Description |
|---|
EEEE
(Hayes notation
====) Point X is exactly equal to point Y. |
EEGG
(Hayes notation
==>>) Interval X extends from point location Y. |
EGEG
(Hayes notation
=>=>) X is a point at maximum of interval Y |
EGGG
(Hayes notation
=>>>) Interval X extends from maximum of interval Y |
GGGG
(Hayes notation
>>>>) Interval X is entirely greater than interval Y |
LEEG
(Hayes notation
<==>) Interval X is exactly equal to finite interval Y. |
LEGG
(Hayes notation
<=>>) Interval X starts with and extends beyond interval Y. |
LELE
(Hayes notation
<=<=) X is a point at minimum of interval Y |
LELG
(Hayes notation
<=<>) Interval X starts with and ends within interval Y |
LGEG
(Hayes notation
<>=>) Interval X starts within and extends to maximum of interval Y |
LGGG
(Hayes notation
<>>>) Interval X starts within and extends beyond interval Y |
LGLG
(Hayes notation
<><>) Interval X is enclosed by interval Y |
LLEE
(Hayes notation
<<==) Interval X starts below and has maximum at point location Y. |
LLEG
(Hayes notation
<<=>) Interval X starts below and extends to maximum of interval Y
Notation: <<=> |
LLGG
(Hayes notation
<<>>) Interval X strictly encloses interval Y |
LLLE
(Hayes notation
<<<=) Interval X extends to minimum of interval Y |
LLLG
(Hayes notation
<<<>) Interval X starts below and extends within interval Y |
LLLL
(Hayes notation
<<<<) Interval X is entirely less than interval Y |
| Modifier and Type | Method and Description |
|---|---|
static RangeExtendedComparator.Result |
get(int[] compFlags)
Get the Result that matches the given array of comparison flags.
|
int |
getAt(int pos)
Gets the result element at the given index.
|
String |
getDesc()
Returns a description for this comparison type.
|
String |
getNotation()
Gets the notation form of this comparison.
|
List<RangeExtendedComparator.Result> |
match(int op,
int pos)
Partial matching: returns a List of Types that have the given
end-point comparison flag at the specified position
|
List<RangeExtendedComparator.Result> |
match(int op,
int pos,
Collection<RangeExtendedComparator.Result> typesToSearch)
Partial matching: returns a List of those Types in the provided Collection
that have the given end-point comparison flag at the specified position.
|
static RangeExtendedComparator.Result |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RangeExtendedComparator.Result[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RangeExtendedComparator.Result LLLL
<<<<) Interval X is entirely less than interval Ypublic static final RangeExtendedComparator.Result LLLE
<<<=) Interval X extends to minimum of interval Ypublic static final RangeExtendedComparator.Result LLLG
<<<>) Interval X starts below and extends within interval Ypublic static final RangeExtendedComparator.Result LLEG
<<=>) Interval X starts below and extends to maximum of interval Y
Notation: <<=>public static final RangeExtendedComparator.Result LEGG
<=>>) Interval X starts with and extends beyond interval Y. public static final RangeExtendedComparator.Result LLEE
<<==) Interval X starts below and has maximum at point location Y. public static final RangeExtendedComparator.Result EEGG
==>>) Interval X extends from point location Y. public static final RangeExtendedComparator.Result LEEG
<==>) Interval X is exactly equal to finite interval Y. public static final RangeExtendedComparator.Result EEEE
====) Point X is exactly equal to point Y. ====public static final RangeExtendedComparator.Result LLGG
<<>>) Interval X strictly encloses interval Ypublic static final RangeExtendedComparator.Result LGLG
<><>) Interval X is enclosed by interval Ypublic static final RangeExtendedComparator.Result LGGG
<>>>) Interval X starts within and extends beyond interval Ypublic static final RangeExtendedComparator.Result LGEG
<>=>) Interval X starts within and extends to maximum of interval Ypublic static final RangeExtendedComparator.Result LELG
<=<>) Interval X starts with and ends within interval Ypublic static final RangeExtendedComparator.Result EGEG
=>=>) X is a point at maximum of interval Ypublic static final RangeExtendedComparator.Result LELE
<=<=) X is a point at minimum of interval Ypublic static final RangeExtendedComparator.Result EGGG
=>>>) Interval X extends from maximum of interval Ypublic static final RangeExtendedComparator.Result GGGG
>>>>) Interval X is entirely greater than interval Ypublic static RangeExtendedComparator.Result[] values()
for (RangeExtendedComparator.Result c : RangeExtendedComparator.Result.values()) System.out.println(c);
public static RangeExtendedComparator.Result valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getNotation()
"<<=>" .public String getDesc()
Range<Integer> r1 = ...
Range<Integer> r2 = ...
RangeComparator.Result comp = r1.compareTo(r2);
System.out.println(String.format("Range r1 %s Range r2", comp.getDesc()));
public int getAt(int pos)
RangeExtendedComparator.MAX_MAX,
RangeExtendedComparator.MAX_MIN,
RangeExtendedComparator.MIN_MAX,
RangeExtendedComparator.MIN_MIN.pos - index of the element to retrieveRangeExtendedComparator.LT, RangeExtendedComparator.GT, or RangeExtendedComparator.EQpublic List<RangeExtendedComparator.Result> match(int op, int pos)
op - one of the RangeComparator constants: LT, EQ, GTpos - flag position 0-3match(int, int, java.util.Collection)public List<RangeExtendedComparator.Result> match(int op, int pos, Collection<RangeExtendedComparator.Result> typesToSearch)
// first call uses two-arg method to select from all Types that have
// the given flag at pos 0 (Types with names L***)
List<Result> types = match(RangeComparator.LT, 0);
// now winnow down to those Types that match LL*G
types = match(RangeComparator.LT, 1, types);
types = match(RangeComparator.GT, 3, types);
for (Result t : types) {
System.out.println(t.toString() + ": " + t.getDesc());
}
op - one of the RangeComparator constants: LT, EQ, GTpos - flag position 0-3typesToSearch - collection of results to searchpublic static RangeExtendedComparator.Result get(int[] compFlags)
compFlags - comparison flagsnull if there is no matchCopyright © 2009–2020. All rights reserved.