コード例 #1
0
        /// <summary>
        /// Determines if the item belongs to this collection.
        /// </summary>
        /// <param name="item">The object to locate in the collection. The value can be a NULL reference (Nothing in Visual Basic).</param>
        /// <returns>True if item is found in the collection; otherwise False.</returns>
        public bool Contains(GenericTreeTableEntry <V> item)
        {
            if (item == null)
            {
                return(false);
            }

            return(thisTree.Contains(item));
        }
コード例 #2
0
        protected GenericTreeTableEntry <V> LookupOrCreateEntry(V item)
        {
            var entry = (GenericTreeTableEntry <V>)item.GetTreeTableEntry(Identifier);

            if (entry == null || entry.Tree == null || entry.Tree != this.thisGenericTree.InternalTree)
            {
                entry = new GenericTreeTableEntry <V>(thisGenericTree, item);
                item.SetTreeTableEntry(Identifier, entry);
            }
            return(entry);
        }
コード例 #3
0
 void ICollection <GenericTreeTableEntry <V> > .Add(GenericTreeTableEntry <V> item)
 {
     Add(item);
 }
コード例 #4
0
 /// <summary>
 /// Adds a value to the end of the collection.
 /// </summary>
 /// <param name="value">The item to be added to the end of the collection. The value must not be a NULL reference (Nothing in Visual Basic). </param>
 /// <returns>The zero-based collection index at which the value has been added.</returns>
 public int Add(GenericTreeTableEntry <V> item)
 {
     return(thisTree.Add(item));
 }
コード例 #5
0
 /// <summary>
 /// Returns the zero-based index of the occurrence of the item in the collection.
 /// </summary>
 /// <param name="value">The item to locate in the collection. The value can be a NULL reference (Nothing in Visual Basic). </param>
 /// <returns>The zero-based index of the occurrence of the item within the entire collection, if found; otherwise -1.</returns>
 public int IndexOf(GenericTreeTableEntry <V> item)
 {
     return(thisTree.IndexOf(item));
 }
コード例 #6
0
 /// <summary>
 /// Removes the specified item from the collection.
 /// </summary>
 /// <param name="item">The item to remove from the collection. If the value is NULL or the item is not contained
 /// in the collection, the method will do nothing.</param>
 public bool Remove(GenericTreeTableEntry <V> item)
 {
     return(thisTree.Remove(item));
 }
コード例 #7
0
 /// <summary>
 /// Inserts an item into the collection at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index at which the item should be inserted.</param>
 /// <param name="item">The item to insert. The value must not be a NULL reference (Nothing in Visual Basic). </param>
 public void Insert(int index, GenericTreeTableEntry <V> item)
 {
     thisTree.Insert(index, item);
 }
コード例 #8
0
 public GenericTreeTableEntry <V> AddIfNotExists(object key, GenericTreeTableEntry <V> entry)
 {
     return((GenericTreeTableEntry <V>)thisTree.AddIfNotExists(key, entry));
 }
コード例 #9
0
 /// <summary>
 /// Optimized access to the previous entry.
 /// </summary>
 /// <param name="current"></param>
 /// <returns></returns>
 public GenericTreeTableEntry <V> GetPreviousEntry(GenericTreeTableEntry <V> current)
 {
     return((GenericTreeTableEntry <V>)thisTree.GetPreviousEntry(current));
 }