[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/Generics ArrayList.cs,1.4,1.5 FixedS
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/Generics ArrayList.cs,1.4,1.5 FixedSizeList.cs,1.2,1.3 IList.cs,1.2,1.3 LinkedList.cs,1.5,1.6 ListWrapper.cs,1.2,1.3 ReadOnlyList.cs,1.3,1.4 |
Date: |
Mon, 24 Feb 2003 03:58:16 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/Generics
In directory subversions:/tmp/cvs-serv6743/Generics
Modified Files:
ArrayList.cs FixedSizeList.cs IList.cs LinkedList.cs
ListWrapper.cs ReadOnlyList.cs
Log Message:
Add "IsRandomAccess" to "IList<T>".
Index: ArrayList.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Generics/ArrayList.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** ArrayList.cs 24 Feb 2003 07:21:00 -0000 1.4
--- ArrayList.cs 24 Feb 2003 08:58:10 -0000 1.5
***************
*** 220,223 ****
--- 220,230 ----
}
}
+ public virtual bool IsRandomAccess
+ {
+ get
+ {
+ return true;
+ }
+ }
public virtual T this[int index]
{
Index: FixedSizeList.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Generics/FixedSizeList.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** FixedSizeList.cs 24 Feb 2003 07:56:27 -0000 1.2
--- FixedSizeList.cs 24 Feb 2003 08:58:10 -0000 1.3
***************
*** 28,32 ****
using System;
! public class FixedSizeList<T> : FixedSizeCollection<T>, IList<T>
{
// Internal state.
--- 28,32 ----
using System;
! public class FixedSizeList<T> : FixedSizeCollection<T>, IList<T>,
IRandomAccess
{
// Internal state.
***************
*** 89,92 ****
--- 89,99 ----
{
return list.IsReadOnly;
+ }
+ }
+ public bool IsRandomAccess
+ {
+ get
+ {
+ return list.IsRandomAccess;
}
}
Index: IList.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Generics/IList.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** IList.cs 24 Feb 2003 04:36:26 -0000 1.2
--- IList.cs 24 Feb 2003 08:58:10 -0000 1.3
***************
*** 41,44 ****
--- 41,45 ----
bool IsFixedSize { get; }
bool IsReadOnly { get; }
+ bool IsRandomAccess { get; }
T this[int index] { get; set; }
Index: LinkedList.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Generics/LinkedList.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** LinkedList.cs 24 Feb 2003 06:56:27 -0000 1.5
--- LinkedList.cs 24 Feb 2003 08:58:10 -0000 1.6
***************
*** 527,530 ****
--- 527,537 ----
}
}
+ public virtual bool IsRandomAccess
+ {
+ get
+ {
+ return false;
+ }
+ }
public virtual T this[int index]
{
Index: ListWrapper.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Generics/ListWrapper.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** ListWrapper.cs 24 Feb 2003 04:36:26 -0000 1.2
--- ListWrapper.cs 24 Feb 2003 08:58:10 -0000 1.3
***************
*** 91,94 ****
--- 91,102 ----
}
}
+ public bool IsRandomAccess
+ {
+ get
+ {
+ // Recognise ArrayList specially as
random-access.
+ return (list is
System.Collections.ArrayList);
+ }
+ }
public T this[int index]
{
Index: ReadOnlyList.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Generics/ReadOnlyList.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ReadOnlyList.cs 24 Feb 2003 07:56:27 -0000 1.3
--- ReadOnlyList.cs 24 Feb 2003 08:58:10 -0000 1.4
***************
*** 86,89 ****
--- 86,96 ----
}
}
+ public bool IsRandomAccess
+ {
+ get
+ {
+ return list.IsRandomAccess;
+ }
+ }
public T this[int index]
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/Generics ArrayList.cs,1.4,1.5 FixedSizeList.cs,1.2,1.3 IList.cs,1.2,1.3 LinkedList.cs,1.5,1.6 ListWrapper.cs,1.2,1.3 ReadOnlyList.cs,1.3,1.4,
Rhys Weatherley <address@hidden> <=