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

    public RangeLongBlock intersection(RangeLongBlock other)
    {
        RangeLongBlock intersection = null;
        RangeRelationType relation = getRelation(other);
        switch (relation)
        {
            case AFTER:
            case BEFORE:
            case BORDERS_AFTER:
            case BORDERS_BEFORE:
                // Do nothing there is no intersection.
                break;
            case EQUAL:
            case SUPERSET:
                intersection = new RangeLongBlock(myStartValue, myEndValue);
                break;
            case OVERLAPS_BACK_EDGE:
                intersection = new RangeLongBlock(other.myStartValue, myEndValue);
                break;
            case OVERLAPS_FRONT_EDGE:
                intersection = new RangeLongBlock(myStartValue, other.myEndValue);
                break;
            case SUBSET:
                intersection = new RangeLongBlock(other.myStartValue, other.myEndValue);
                break;
            default:
                break;
        }
        return intersection;
    }

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

}