Index: trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/List.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/List.ab	(revision 531)
+++ trunk/ab5.0/ablib/src/Classes/System/Collections/Generic/List.ab	(revision 543)
@@ -17,6 +17,38 @@
 End Interface
 
+
+Class ICollection<T>
+	Implements IEnumerable<T>, IEnumerator<T>
+Public
+	' Property
+	Abstract Function Count() As Long
+	Abstract Function IsReadOnly() As Boolean
+
+	' Methods
+	Abstract Sub Add( item As T )
+	Abstract Sub Clear()
+'	Abstract Function Contains ( item As T ) As Boolean
+'	Abstract Sub CopyTo (ByRef array As List<T>, arrayIndex As Long )
+	Abstract Function Remove( item As T ) As Boolean
+End Class
+
+
+Class IList<T>
+	Inherits ICollection<T>
+Public
+	' Property
+	Abstract Sub Operator[] ( index As Long, item As T )
+	Abstract Function Operator[] ( index As Long ) As T
+	' Methods
+'	Abstract Function Item ( index As Long ) As T
+	Abstract Function IndexOf( item As T ) As Long
+	Abstract Sub Insert( index As Long, item As T )
+	Abstract Sub RemoveAt( index As Long )
+End Class
+
+
 Class List<T>
-	Implements IEnumerable<T>, IEnumerator<T>
+	Inherits IList<T>
+
 	items As *T
 	size As Long
@@ -35,4 +67,27 @@
 		Reset()
 	End Sub
+
+	/*!
+	@brief	予め要素数を指定してList<T>を初期化
+	@author	NoWest
+	@date	2008/07/13
+	@param	リストの要素数
+	*/
+	Sub List( capacity As Long )
+		This.List()
+		This.Realloc( capacity )
+	End Sub
+
+	/*!
+	@brief	既存の配列List<T>を初期化
+	@author	NoWest
+	@date	2008/07/13
+	@param	インデックス
+	*/
+	Sub List( array As *T, count As Long )
+		This.List( count )
+		memmove( This.items, array, count * SizeOf(T) )
+		This.size = count
+	End Sub
 	Sub ~List()
 	End Sub
@@ -44,5 +99,8 @@
 	@param	インデックス
 	*/
-	Function Operator[] ( index As Long ) As T
+	Override Sub Operator[] ( index As Long, item As T )
+		items[index]=item
+	End Sub
+	Override Function Operator[] ( index As Long ) As T
 		Return items[index]
 	End Function
@@ -68,8 +126,16 @@
 	@date	2007/08/22
 	*/
-	Function Count() As Long
+	Override Function Count() As Long
 		Return size
 	End Function
 
+	/*!
+	@brief	Listが読み込み専用かどうかを取得する
+	@author	NoWest
+	@date	2008/07/12
+	*/
+	Override Function IsReadOnly() As Boolean
+		Return False
+	End Function
 
 	'----------------------------------------------------------------
@@ -83,5 +149,5 @@
 	@param	追加するオブジェクト
 	*/
-	Sub Add( item As T )
+	Override Sub Add( item As T )
 		Realloc( size + 1 )
 
@@ -90,4 +156,6 @@
 	End Sub
 
+'	Function AsReadOnly() As ReadOnlyCollection
+
 	/*!
 	@brief	Listからすべての要素を削除する
@@ -95,8 +163,12 @@
 	@date	2007/08/22
 	*/
-	Sub Clear()
+	Override Sub Clear()
 		size = 0
 	End Sub
 
+/*	Override Function Contains ( item As T ) As Boolean
+		TODO
+	End Function*/
+
 	/*!
 	@brief	List内から、最初に出現する値のインデックスを取得する
@@ -105,5 +177,5 @@
 	@return	インデックス（見つからなかったときは-1）
 	*/
-	Function IndexOf( item As T ) As Long
+	Override Function IndexOf( item As T ) As Long
 		Dim i As Long
 		For i = 0 To ELM(size)
@@ -120,5 +192,5 @@
 	@date	2007/08/22
 	*/
-	Sub Insert( index As Long, item As T )
+	Override Sub Insert( index As Long, item As T )
 		Realloc( size + 1 )
 		memmove( items + (index+1)*SizeOf(T), items + index*SizeOf(T), (size-index)*SizeOf(T) )
@@ -133,5 +205,5 @@
 	@return	値が削除されたときはTrue、されなかったときはFlaseが返る
 	*/
-	Function Remove( item As T ) As Boolean
+	Override Function Remove( item As T ) As Boolean
 		Dim index = IndexOf( item )
 		If index = -1 Then
@@ -149,5 +221,5 @@
 	@return	値が削除されたときはTrue、されなかったときはFlaseが返る
 	*/
-	Sub RemoveAt( index As Long )
+	Override Sub RemoveAt( index As Long )
 		memmove( items + index*SizeOf(T), items + (index+1)*SizeOf(T), (size-(index+1))*SizeOf(T) )
 		Realloc( size - 1 )
@@ -176,5 +248,5 @@
 	@return	IEnumeratorインターフェイスが返る
 	*/
-	Function GetEnumerator() As IEnumerator<T>
+	Override Function GetEnumerator() As IEnumerator<T>
 		Return This
 	End Function
@@ -186,5 +258,5 @@
 	@return	上限に達していなければTrueが、達していればFalseが返る
 	*/
-	Function MoveNext() As Boolean
+	Override Function MoveNext() As Boolean
 		If currentIndexForEnumerator + 1 >= size Then
 			' 上限に達した
@@ -201,5 +273,5 @@
 	@date	2007/11/19
 	*/
-	Sub Reset()
+	Override Sub Reset()
 		currentIndexForEnumerator = -1
 	End Sub
@@ -211,5 +283,5 @@
 	@return	カレントオブジェクトが返る
 	*/
-	Function Current() As T
+	Override Function Current() As T
 		If currentIndexForEnumerator = -1 Then
 			' MoveNextメソッドがReset後、一度も呼び出されなかった
@@ -220,4 +292,5 @@
 End Class
 
+
 End Namespace
 End Namespace
