public int compare()

in ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/OffsetDiff.java [108:139]


        public int compare (Span other)
        {
            if ((getBegin() == other.getBegin()) &&
                (getEnd() == other.getEnd())) {
                return COMPARE_EQUAL;
            }
            if ((getBegin() <= other.getBegin()) &&
                (getEnd() >= other.getEnd())) {
                return COMPARE_CONTAINS;
            }
            if ((getBegin() >= other.getBegin()) &&
                (getEnd() <= other.getEnd())) {
                return COMPARE_BELONGS;
            }
            if ((getBegin() < other.getBegin()) && (getEnd() > other.getBegin()) &&
                (getEnd() < other.getEnd())) {
                return COMPARE_BEHIND;
            }
            if ((getBegin() > other.getBegin()) && (other.getEnd() > getBegin()) &&
                (getEnd() > other.getEnd())) {
                return COMPARE_AHEAD;
            }
            if ((getBegin() > other.getBegin()) &&
                (getBegin() >= other.getEnd())) {
                return COMPARE_FARAHEAD;
            }
            if ((getBegin() < other.getBegin()) &&
                (getEnd() <= other.getBegin())) {
                return COMPARE_FARBEHIND;
            }
            return COMPARE_NONE;
        }