class RangeLongBlock implements Comparable<RangeLongBlock>, Iterable<Long> {

    public RangeRelationType getRelation(RangeLongBlock block)
    {
        RangeRelationType result = null;
        if (block.myEndValue < myStartValue)
        {
            if (block.myEndValue == myStartValue - 1)
            {
                result = RangeRelationType.BORDERS_BEFORE;
            }
            else
            {
                result = RangeRelationType.BEFORE;
            }
        }
        else if (block.myStartValue > myEndValue)
        {
            if (block.myStartValue - 1 == myEndValue)
            {
                result = RangeRelationType.BORDERS_AFTER;
            }
            else
            {
                result = RangeRelationType.AFTER;
            }
        }
        else if (equals(block))
        {
            result = RangeRelationType.EQUAL;
        }
        else
            // Overlaps, is contained or contains.
        {
            if (block.myStartValue >= myStartValue && block.myEndValue <= myEndValue)
            {
                result = RangeRelationType.SUBSET;
            }
            else if (block.myStartValue <= myStartValue && block.myEndValue >= myEndValue)
            {
                result = RangeRelationType.SUPERSET;
            }
            else if (block.myStartValue < myStartValue && block.myEndValue <= myEndValue)
            {
                result = RangeRelationType.OVERLAPS_FRONT_EDGE;
            }
            else
            {
                result = RangeRelationType.OVERLAPS_BACK_EDGE;
            }
        }
        return result;
    }

    public  RangeLongBlock(long value);
    public  RangeLongBlock(long startValue, long endValue);
    public  RangeLongBlock(RangeLongBlock other);

}