abstract class $RANGE{NTP < $CARDINAL{NTP}} < $ELT{NTP},


Ancestors
$ANCHORED_FMT $FMT $STR $TEXT
$BINARY $IS_EQ $ELT{_} $ELT



Public


Features
contains(val : NTP) : BOOL ;
**** This routine returns true iff val lies within the range.
empty : SAME ;
**** The empty range!
first : NTP ;
****
________This_routine_returns_the_lowest_value_in_the_range_provided_that
___the_range_is_not_empty.
intersection(other : $RANGE{NTP}) : SAME ;
****
________This_feature_returns_the_intersection_of_self_and_other_unless_they
___are_disjoint_when_the_empty_range_is_returned..
is_adjacent(other : $RANGE{NTP}) : BOOL ;
****
________This_predicate_returns_true_if_and_only_if_self_and_other_are
___adjacent_or_intersecting.
is_disjoint(other : $RANGE{NTP}) : BOOL ;
****
________This_predicate_returns_true_if_and_only_if_self_and_other_do_not
___overlap.
is_empty : BOOL ;
**** This routine returns true if and only if self is an empty range.
is_intersecting(other : $RANGE{NTP}) : BOOL ;
****
________This_predicate_returns_true_if_and_only_if_the_ranges_of_other_and
___self_have_one_or_more_common_values.
last : NTP ;
****
________This_routine_returns_the_highest_value_in_the_range_provided_that
___the_range_is_not_empty.
merge(other : $RANGE{NTP}) : SAME ;
****
________This_routine_returns_the_union_of_self_and_other_providing_they_are
___adjacent_or_intersecting,_otherwise_the_empty_range.
offset(range_val : NTP) : NTP ;
****
________This_routine_returns_the_value_of_range_val_as_an_offset_from_zero,
___taking_into_account_the_range_low_limit.
rev! : NTP ;
****
________This_iter_feature_yields_all_of_the_values_of_self_from_high_-_1
___down_to_and_including_low_in_turn.
union(other : $RANGE{NTP}) : SAME ;
****
________This_feature_returns_the_union_of_self_and_other_provided_that_they
___are_not_disjoint,_when_the_empty_range_shall_be_returned.

The Sather Home Page