示例#1
0
文件: Interval.cs 项目: jippegbg/PLib
        /// <summary>
        ///     Determines whether whether a specified interval is contained by the current interval.
        /// </summary>
        /// <param name="other">The interval to check.</param>
        /// <returns>
        ///     <see langword="true"/> if the specified interval <paramref name="other"/> is inside,
        ///     and not equal to, the current interval; otherwise, <see langword="false"/>.
        /// </returns>
        public bool IsProperSupersetOf(Interval <T> other)
        {
            if (other == null)
            {
                return(true);
            }

            return(LowerLimit.LessThan(other.LowerLimit, Position.Lower) &&
                   UpperLimit.GreaterThan(other.UpperLimit, Position.Upper));
        }