Class ListUtil
Inheritance
System.Object
ListUtil
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: PLATEAU.Util
Assembly: cs.temp.dll.dll
Syntax
public static class ListUtil
Methods
FindMinIndex<T>(IReadOnlyList<T>, Comparer<T>)
compareで比較して最小のindexを返す.同値のものがある場合は最初のものを返す.
Declaration
public static int FindMinIndex<T>(this IReadOnlyList<T> self, Comparer<T> compare)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<T> | self | |
Comparer<T> | compare |
Returns
Type | Description |
---|---|
System.Int32 |
Type Parameters
Name | Description |
---|---|
T |
IndexIn<T>(IList<T>, Int32)
return index >= 0 and index < self.Count;
Declaration
public static bool IndexIn<T>(this IList<T> self, int index)
Parameters
Type | Name | Description |
---|---|---|
IList<T> | self | |
System.Int32 | index |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T |
Reversed<T>(IList<T>)
LinqのReverseは遅いので自前で実装
Declaration
public static IEnumerable<T> Reversed<T>(this IList<T> self)
Parameters
Type | Name | Description |
---|---|---|
IList<T> | self |
Returns
Type | Description |
---|---|
IEnumerable<T> |
Type Parameters
Name | Description |
---|---|
T |