Exemple #1
0
        ///
        ///	 <summary> * isList - tests if 'this' is a List
        ///	 *  </summary>
        ///	 * <returns> boolean - true if 'this' contains no ranges </returns>
        ///
        public bool isList()
        {
            int sz = rangeList.Count;

            for (int i = 0; i < sz; i++)
            {
                JDFRange range = this[i];
                if (!range.getLeftObject().Equals(range.getRightObject()))
                {
                    return(false);
                }
            }
            return(true); // if we are here 'this' is a List
        }
Exemple #2
0
        ///
        ///	 <summary> * isUnique - tests if 'this' has only unique values
        ///	 *  </summary>
        ///	 * <returns> boolean: true if 'this' is a unique range list </returns>
        ///
        public bool isUnique()
        {
            int sz = rangeList.Count;

            for (int i = 0; i < sz; i++)
            {
                JDFRange range = this[i];
                for (int j = 0; j < sz; j++)
                {
                    if (j != i)
                    {
                        JDFRange other = this[j];
                        // even if one of the range deliminators belongs to any
                        // other range - return false (range is not unique)
                        if ((other.inObjectRange(range.getLeftObject())) || (other.inObjectRange(range.getRightObject())))
                        {
                            return(false);
                        }
                    }
                }
            }
            return(true);
        }