Changeset 582
- Timestamp:
- Aug 9, 2008, 1:44:45 PM (16 years ago)
- Location:
- trunk/ab5.0/ablib/src/Classes/System/Collections
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/Collections/ArrayList.ab
r440 r582 1 1 ' Classes/System/Collections/ArrayList.ab 2 3 #require <Classes/System/Collections/misc.ab>4 2 5 3 Namespace System … … 140 138 size++ 141 139 End Function 142 143 Virtual Sub AddRange(c As ICollection) 144 ' TODO: 実装 145 End Sub 146 140 /* 147 141 Const Virtual Function BinarySearch(x As Object) As Long 148 142 ' TODO: 実装 … … 183 177 End If 184 178 End Function 185 179 */ 186 180 /*Override*/ Virtual Sub Clear() 187 181 size = 0 … … 245 239 End Sub 246 240 247 Virtual Sub InsertRange(index As Long, c As ICollection)248 ' TODO: 実装249 End Sub250 251 241 /*Const*/ Virtual Function LastIndexOf(object As Object) As Long 252 242 LastIndexOf(object, 0, size) … … 286 276 End Sub 287 277 288 Virtual Sub SetRange(index As Long, c As ICollection)289 ' TODO: 実装290 End Sub291 292 278 Virtual Sub Sort() 293 ' TODO: 実装294 End Sub295 296 Virtual Sub Sort(c As IComparer)297 Sort(0, size, c)298 End Sub299 300 Virtual Sub Sort(index As Long, count As Long, c As IComparer)301 279 ' TODO: 実装 302 280 End Sub … … 309 287 Override Function ToString() As String 310 288 Return "System.Collections.ArrayList" 311 End Function312 313 ' --------------------------------314 ' static methods315 Static Function Adapter(l As IList) As ArrayList316 ' TODO: 実装317 End Function318 319 Static Function FixedSize(l As ArrayList) As ArrayList320 ' TODO: 実装321 End Function322 323 Static Function FixedSize(l As IList) As IList324 ' TODO: 実装325 'Return FixedSize(Adapter(l))326 End Function327 328 Static Function ReadOnly(l As ArrayList) As ArrayList329 ' TODO: 実装330 End Function331 332 Static Function ReadOnly(l As IList) As IList333 ' TODO: 実装334 'Return ReadOnly(Adapter(l))335 289 End Function 336 290 … … 342 296 Next 343 297 End Function 344 345 Static Function Synchronized(l As ArrayList) As ArrayList346 ' TODO: 実装347 End Function348 349 Static Function Synchronized(l As IList) As IList350 ' TODO: 実装351 'Return Synchronized(Adapter(l))352 End Function353 354 298 End Class 355 299 -
trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/Dictionary.ab
r542 r582 1 1 'Classes/System/Collections/Generic/Dictionary.ab 2 3 '#require <Classes/System/Collections/Generic/EqualityComparer.ab>4 2 5 3 Namespace System -
trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/List.ab
r579 r582 96 96 */ 97 97 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 ) 98 111 If 0 <= index And index < capacity Then 99 112 items[index]=item … … 102 115 End If 103 116 End Sub 104 Override Function Operator[]( index As Long ) As T117 Override Function Item( index As Long ) As T 105 118 If 0 <= index And index < capacity Then 106 119 Return items[index] … … 109 122 End If 110 123 End Function 111 112 124 /*! 113 125 @brief ポインタ型へのキャスト -
trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/Queue.ab
r579 r582 5 5 6 6 Class Queue<T> 7 Implements IEnumerable<T> , IEnumerator<T>, System.Collections.ICollection7 Implements IEnumerable<T> 8 8 9 9 items As *T … … 28 28 End Sub 29 29 30 /*!31 @brief Queueに格納されている要素の数を取得32 @author NoWest33 @date 2008/07/2034 */35 Override Function Count () As Long36 Return This.count37 End Function38 39 30 Public 40 /*!41 @brief Queueからすべての要素を削除する42 @author NoWest43 @date 2008/07/2044 */45 Sub Clear ()46 This.count = 047 End Sub48 49 31 'ある要素が Queue内に存在するかどうかを判断 50 32 /* Override Function Contains ( item As T ) As Boolean -
trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/Stack.ab
r579 r582 5 5 6 6 Class Stack<T> 7 Implements IEnumerable<T> , IEnumerator<T>, System.Collections.ICollection7 Implements IEnumerable<T> 8 8 9 9 items As *T … … 27 27 End If 28 28 End Sub 29 30 /*!31 @brief Stackに格納されている要素の数を取得32 @author NoWest33 @date 2008/07/2034 */35 Override Function Count () As Long36 Return This.count37 End Function38 29 39 30 Public -
trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/misc.ab
r579 r582 42 42 Abstract Function Operator[] ( index As Long ) As T 43 43 44 ' Methods 44 Abstract Sub Item ( index As Long, item As T ) 45 Abstract Function Item ( index As Long ) As T 46 45 47 Abstract Function IndexOf ( item As T ) As Long 46 48 Abstract Sub Insert ( index As Long, item As T ) -
trunk/ab5.0/ablib/src/Classes/System/Collections/misc.ab
r577 r582 1 1 ' Classes/System/Collections/misc.ab 2 3 #ifndef __SYSTEM_COLLECTIONS_MISC_AB__4 #define __SYSTEM_COLLECTIONS_MISC_AB__5 2 6 3 Namespace System 7 4 Namespace Collections 8 9 Interface ICollection10 Inherits IEnumerable11 ' Properties12 Function Count() As Long13 '/*Const*/ Function IsSynchronized() As Boolean14 ' Function SyncRoot() As ...15 ' Methods16 ' Sub CopyTo(ByRef array As ..., index As Long)17 End Interface18 19 Interface IComparer20 ' Methods21 Function Compare(ByRef x As Object, ByRef y As Object) As Long22 End Interface23 24 Interface IDictionary25 Inherits ICollection /*, IEnumerable */26 ' Methods27 Sub Add(ByRef key As Object, ByRef value As Object)28 Sub Clear()29 /*Const*/ Function Contains(ByRef key As Object) As Boolean30 ' /*Const*/ Function GetEnumerator() As *IDictionaryEnumerator31 /*Const*/ Function Remove(ByRef key As Object) As Boolean32 ' Properties33 /*Const*/ Function IsFixedSize() As Boolean34 /*Const*/ Function IsReadOnly() As Boolean35 ' /*Const*/ Function Operator [](ByRef key As Object) As *Object36 ' Sub Operator []=(ByRef key As Object, ByRef value As Object)37 /*Const*/ Function Keys() As *ICollection38 /*Const*/ Function Values() As ICollection39 End Interface40 41 Interface IDictionaryEnumerator42 Inherits IEnumerator43 ' Properties44 /*Const*/ Function Entry() As DictionaryEntry45 /*Const*/ Function Key() As *Object46 /*Const*/ Function Value() As *Object47 End Interface48 5 49 6 Interface IEnumerable … … 60 17 End Interface 61 18 62 Interface IEqualityComparer63 ' Methods64 Function Equals(ByRef x As Object, ByRef y As Object) As Boolean65 Function GetHashCode(ByRef obj As Object) As Long66 End Interface67 68 19 Interface IList 69 Inherits ICollection/*, IEnumerable */20 'Inherits /*, IEnumerable */ 70 21 ' Methods 71 22 'Function Add(value As *Object) As Long … … 83 34 End Interface 84 35 85 Class DictionaryEntry86 Public87 ' /*Const*/ructors88 Sub DictionaryEntry()89 k = 090 v = 091 End Sub92 93 Sub DictionaryEntry(ByRef key As Object, ByRef value As Object)94 k = VarPtr(key)95 v = VarPtr(value)96 End Sub97 98 ' Properties99 /*Const*/ Function Key() As *Object100 Return k101 End Function102 103 Sub Key(ByRef key As Object)104 k = VarPtr(key)105 End Sub106 107 /*Const*/ Function Value() As *Object108 Return v109 End Function110 111 Sub Value(ByRef value As Object)112 v = VarPtr(value)113 End Sub114 Private115 k As *Object116 v As *Object117 End Class118 119 36 End Namespace 'Collections 120 37 End Namespace 'System 121 122 #endif '__SYSTEM_COLLECTIONS_MISC_AB__
Note:
See TracChangeset
for help on using the changeset viewer.