/// <summary> /// Returns a view of elements until the specified element. /// </summary> /// <returns>Returns a sorted set of elements that are strictly less than the specified element.</returns> public virtual SortedSetSupport HeadSet(Object toElement) { SortedSetSupport tempSortedSet = new SortedSetSupport(); IEnumerator tempEnumerator = this.GetEnumerator(); while ((tempEnumerator.MoveNext() && ((tempEnumerator.Current.ToString().CompareTo(toElement.ToString())) < 0))) { tempSortedSet.Add(tempEnumerator.Current); } return(tempSortedSet); }
/// <summary> /// Returns a view of elements from the specified element. /// </summary> /// <returns>Returns a sorted set of elements that are greater or equal to the specified element.</returns> public virtual SortedSetSupport TailSet(Object fromElement) { SortedSetSupport tempSortedSet = new SortedSetSupport(); IEnumerator tempEnumerator = this.GetEnumerator(); while ((tempEnumerator.MoveNext() && (!((Int32)tempEnumerator.Current >= (Int32)fromElement)))) { tempSortedSet.Add(tempEnumerator.Current); } return(tempSortedSet); }
/// <summary> /// Returns a view of elements from the specified element. /// </summary> /// <returns>Returns a sorted set of elements that are greater or equal to the specified element.</returns> public virtual SortedSetSupport TailSet(Object fromElement) { SortedSetSupport tempSortedSet = new SortedSetSupport(); IEnumerator tempEnumerator = this.GetEnumerator(); while ((tempEnumerator.MoveNext() && (!((Int32) tempEnumerator.Current >= (Int32) fromElement)))) tempSortedSet.Add(tempEnumerator.Current); return tempSortedSet; }
/// <summary> /// Returns a view of elements until the specified element. /// </summary> /// <returns>Returns a sorted set of elements that are strictly less than the specified element.</returns> public virtual SortedSetSupport HeadSet(Object toElement) { SortedSetSupport tempSortedSet = new SortedSetSupport(); IEnumerator tempEnumerator = this.GetEnumerator(); while ((tempEnumerator.MoveNext() && ((tempEnumerator.Current.ToString().CompareTo(toElement.ToString())) < 0))) tempSortedSet.Add(tempEnumerator.Current); return tempSortedSet; }