Changeset 592 for trunk


Ignore:
Timestamp:
Aug 16, 2008, 1:25:04 AM (16 years ago)
Author:
NoWest
Message:

IListおよびICollectionをインターフェイス化

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

Legend:

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

    r587 r592  
    4040
    4141Class List<T>
    42     Inherits IList<T>
     42    Implements IList<T>
    4343
    4444    items As *T
     
    9595    @param  インデックス
    9696    */
    97     Override Sub Operator[] ( index As Long, item As T )
     97    Sub Operator[] ( index As Long, item As T )
    9898        Item[index] = item
    9999    End Sub
    100     Override Function Operator[] ( index As Long ) As T
     100    Function Operator[] ( index As Long ) As T
    101101        Return Item[index]
    102102    End Function
  • trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/misc.ab

    r582 r592  
    1919
    2020
    21 Class ICollection<T>
    22     Implements IEnumerable<T>
    23 Public
     21Interface ICollection<T>
     22    Inherits IEnumerable<T>
    2423    ' Property
    25     Abstract Function Count() As Long
    26     Abstract Function IsReadOnly() As Boolean
     24    Function Count() As Long
     25    Function IsReadOnly() As Boolean
    2726
    2827    ' Methods
    29     Abstract Sub Add ( item As T )
    30     Abstract Sub Clear ()
    31 '   Abstract Function Contains ( item As T ) As Boolean
    32 '   Abstract Sub CopyTo (ByRef array As List<T>, arrayIndex As Long )
    33     Abstract Function Remove ( item As T ) As Boolean
    34 End Class
     28    Sub Add ( item As T )
     29    Sub Clear ()
     30'    Function Contains ( item As T ) As Boolean
     31'   Sub CopyTo (ByRef array As List<T>, arrayIndex As Long )
     32    Function Remove ( item As T ) As Boolean
     33End Interface
    3534
    3635
    37 Class IList<T>
     36Interface IList<T>
    3837    Inherits ICollection<T>
    39 Public
    4038    ' Property
    41     Abstract Sub Operator[] ( index As Long, item As T )
    42     Abstract Function Operator[] ( index As Long ) As T
     39'   Sub Operator[] ( index As Long, item As T )
     40'   Function Operator[] ( index As Long ) As T
    4341
    44     Abstract Sub Item ( index As Long, item As T )
    45     Abstract Function Item ( index As Long ) As T
     42    Sub Item ( index As Long, item As T )
     43    Function Item ( index As Long ) As T
    4644
    47     Abstract Function IndexOf ( item As T ) As Long
    48     Abstract Sub Insert ( index As Long, item As T )
    49     Abstract Sub RemoveAt( index As Long )
    50 End Class
    51 
    52 Namespace Details
    53 
    54 Interface ICollection<T>
    55     ' Property
    56     Function Count() As Long
    57     '/*Const*/ Function IsSynchronized() As Boolean
    58     ' Function SyncRoot() As ...
     45    Function IndexOf ( item As T ) As Long
     46    Sub Insert ( index As Long, item As T )
     47    Sub RemoveAt( index As Long )
    5948End Interface
    60 
    61 End Namespace
    62 
    6349
    6450End Namespace
Note: See TracChangeset for help on using the changeset viewer.