/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #if NET35 using System.Linq; using System.Runtime.Serialization; namespace System.Collections.Generic { public class SortedSet : ISet, ICollection, ISerializable, IDeserializationCallback { private readonly SortedDictionary _list; public SortedSet(IComparer comparer) { _list = new SortedDictionary(comparer); } public T Min { get { return (_list.Count) >= 1 ? _list.Keys.First() : default(T); } } public T Max { get { return (_list.Count) >= 1 ? _list.Keys.Last() : default(T); } } /// /// Removes all items from the . /// /// The is read-only. /// public void Clear() { throw new NotImplementedException(); } public bool Contains(T value) { return _list.ContainsKey(value); } public void Add(T value) { //base.Add(value, 0); } #region ISet Implementation bool ISet.Add(T item) { throw new NotImplementedException(); } void ISet.ExceptWith(IEnumerable other) { throw new NotImplementedException(); } void ISet.IntersectWith(IEnumerable other) { throw new NotImplementedException(); } bool ISet.IsProperSubsetOf(IEnumerable other) { throw new NotImplementedException(); } bool ISet.IsProperSupersetOf(IEnumerable other) { throw new NotImplementedException(); } bool ISet.IsSubsetOf(IEnumerable other) { throw new NotImplementedException(); } bool ISet.IsSupersetOf(IEnumerable other) { throw new NotImplementedException(); } bool ISet.Overlaps(IEnumerable other) { throw new NotImplementedException(); } bool ISet.SetEquals(IEnumerable other) { throw new NotImplementedException(); } void ISet.SymmetricExceptWith(IEnumerable other) { throw new NotImplementedException(); } void ISet.UnionWith(IEnumerable other) { throw new NotImplementedException(); } void ICollection.Add(T item) { throw new NotImplementedException(); } void ICollection.Clear() { throw new NotImplementedException(); } bool ICollection.Contains(T item) { throw new NotImplementedException(); } void ICollection.CopyTo(T[] array, int arrayIndex) { throw new NotImplementedException(); } int ICollection.Count { get { throw new NotImplementedException(); } } bool ICollection.IsReadOnly { get { throw new NotImplementedException(); } } bool ICollection.Remove(T item) { throw new NotImplementedException(); } IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); } #endregion #region ICollection Implementation void ICollection.CopyTo(Array array, int index) { throw new NotImplementedException(); } int ICollection.Count { get { throw new NotImplementedException(); } } bool ICollection.IsSynchronized { get { throw new NotImplementedException(); } } object ICollection.SyncRoot { get { throw new NotImplementedException(); } } IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); } #endregion #region ISerializable Implementation void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { throw new NotImplementedException(); } #endregion #region IDeserializationCallback Implementation void IDeserializationCallback.OnDeserialization(object sender) { throw new NotImplementedException(); } #endregion } } #endif