Ignore:
Timestamp:
Aug 9, 2008, 1:44:45 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

非Genericコレクションインタフェースの扱いを大幅に縮小。Queue/Stackの実装インタフェースの修正。

Location:
trunk/ab5.0/ablib/src/Classes/System/Collections/Generic
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/Dictionary.ab

    r542 r582  
    11'Classes/System/Collections/Generic/Dictionary.ab
    2 
    3 '#require <Classes/System/Collections/Generic/EqualityComparer.ab>
    42
    53Namespace System
  • trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/List.ab

    r579 r582  
    9696    */
    9797    Override Sub Operator[] ( index As Long, item As T )
     98        Item[index] = item
     99    End Sub
     100    Override Function Operator[] ( index As Long ) As T
     101        Return Item[index]
     102    End Function
     103
     104    /*!
     105    @brief  インデクサ
     106    @author Egtra
     107    @date   2008/08/04
     108    @param  インデックス
     109    */
     110    Override Sub Item( index As Long, item As T )
    98111        If 0 <= index And index < capacity Then
    99112            items[index]=item
     
    102115        End If
    103116    End Sub
    104     Override Function Operator[] ( index As Long ) As T
     117    Override Function Item( index As Long ) As T
    105118        If 0 <= index And index < capacity Then
    106119            Return items[index]
     
    109122        End If
    110123    End Function
    111 
    112124    /*!
    113125    @brief  ポインタ型へのキャスト
  • trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/Queue.ab

    r579 r582  
    55
    66Class Queue<T>
    7     Implements IEnumerable<T>, IEnumerator<T>, System.Collections.ICollection
     7    Implements IEnumerable<T>
    88
    99    items As *T
     
    2828    End Sub
    2929
    30     /*!
    31     @brief  Queueに格納されている要素の数を取得
    32     @author NoWest
    33     @date   2008/07/20
    34     */
    35     Override Function Count () As Long
    36         Return This.count
    37     End Function
    38 
    3930Public
    40     /*!
    41     @brief  Queueからすべての要素を削除する
    42     @author NoWest
    43     @date   2008/07/20
    44     */
    45     Sub Clear ()
    46         This.count = 0
    47     End Sub
    48 
    4931    'ある要素が Queue内に存在するかどうかを判断
    5032/*  Override Function Contains ( item As T ) As Boolean
  • trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/Stack.ab

    r579 r582  
    55
    66Class Stack<T>
    7     Implements IEnumerable<T>, IEnumerator<T>, System.Collections.ICollection
     7    Implements IEnumerable<T>
    88
    99    items As *T
     
    2727        End If
    2828    End Sub
    29 
    30     /*!
    31     @brief  Stackに格納されている要素の数を取得
    32     @author NoWest
    33     @date   2008/07/20
    34     */
    35     Override Function Count () As Long
    36         Return This.count
    37     End Function
    3829
    3930Public
  • trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/misc.ab

    r579 r582  
    4242    Abstract Function Operator[] ( index As Long ) As T
    4343
    44     ' Methods
     44    Abstract Sub Item ( index As Long, item As T )
     45    Abstract Function Item ( index As Long ) As T
     46
    4547    Abstract Function IndexOf ( item As T ) As Long
    4648    Abstract Sub Insert ( index As Long, item As T )
Note: See TracChangeset for help on using the changeset viewer.