init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
85
Kreta.Core/Tuples.cs
Normal file
85
Kreta.Core/Tuples.cs
Normal file
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a strongly typed list of Tuples that can be accessed by index. Provides methods to search, sort, and manipulate lists.
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">The type of the first component of the tuples.</typeparam>
|
||||
/// <typeparam name="T2">The type of the second component of the tuples.</typeparam>
|
||||
/// <typeparam name="T3">The type of the third component of the tuples.</typeparam>
|
||||
/// <typeparam name="T4">The type of the fourth component of the tuples.</typeparam>
|
||||
[Obsolete("@DevKornél: szuboptimális a megvalósítás, nem feltétlen kellene list belsejében használni sok elemű tuple-t")]
|
||||
public class QuadrupleList<T1, T2, T3, T4> : List<Tuple<T1, T2, T3, T4>>
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds a Tuple to the end of the Kreta.Core.QuadrupleList.
|
||||
/// </summary>
|
||||
/// <param name="first">The value of the first component of the tuple.</param>
|
||||
/// <param name="second">The value of the second component of the tuple.</param>
|
||||
/// <param name="third">The value of the third component of the tuple.</param>
|
||||
/// <param name="fourth">The value of the fourth component of the tuple.</param>
|
||||
public void Add(T1 first, T2 second, T3 third, T4 fourth)
|
||||
{
|
||||
Add(new Tuple<T1, T2, T3, T4>(first, second, third, fourth));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the elements of the specified collection to the end of the Kreta.Core.QuadrupleList.
|
||||
/// </summary>
|
||||
/// <param name="list">The collection whose elements should be added to the end of the Kreta.Core.QuadrupleList. The collection itself cannot be null, but it can contain elements that are null, if any of the types T1, T2, T3, or T4 are reference types.</param>
|
||||
public QuadrupleList(IEnumerable<Tuple<T1, T2, T3, T4>> list)
|
||||
{
|
||||
AddRange(list);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the Kreta.Core.QuadrupleList class that is empty and has the default initial capacity.
|
||||
/// </summary>
|
||||
public QuadrupleList() : base()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a strongly typed list of Tuples that can be accessed by index. Provides methods to search, sort, and manipulate lists.
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">The type of the first component of the tuples.</typeparam>
|
||||
/// <typeparam name="T2">The type of the second component of the tuples.</typeparam>
|
||||
/// <typeparam name="T3">The type of the third component of the tuples.</typeparam>
|
||||
/// <typeparam name="T4">The type of the fourth component of the tuples.</typeparam>
|
||||
/// <typeparam name="T5">The type of the fifth component of the tuples.</typeparam>
|
||||
[Obsolete("@DevKornél: szuboptimális a megvalósítás, nem feltétlen kellene list belsejében használni sok elemű tuple-t")]
|
||||
public class QuintupleList<T1, T2, T3, T4, T5> : List<Tuple<T1, T2, T3, T4, T5>>
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds a Tuple to the end of the Kreta.Core.QuintupleList.
|
||||
/// </summary>
|
||||
/// <param name="first">The value of the first component of the tuple.</param>
|
||||
/// <param name="second">The value of the second component of the tuple.</param>
|
||||
/// <param name="third">The value of the third component of the tuple.</param>
|
||||
/// <param name="fourth">The value of the fourth component of the tuple.</param>
|
||||
/// <param name="fifth">The value of the fifth component of the tuple.</param>
|
||||
public void Add(T1 first, T2 second, T3 third, T4 fourth, T5 fifth)
|
||||
{
|
||||
Add(new Tuple<T1, T2, T3, T4, T5>(first, second, third, fourth, fifth));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the elements of the specified collection to the end of the Kreta.Core.QuintupleList.
|
||||
/// </summary>
|
||||
/// <param name="list">The collection whose elements should be added to the end of the Kreta.Core.QuintupleList. The collection itself cannot be null, but it can contain elements that are null, if any of the types T1, T2, T3, or T4 are reference types.</param>
|
||||
public QuintupleList(List<Tuple<T1, T2, T3, T4, T5>> list)
|
||||
{
|
||||
AddRange(list);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the Kreta.Core.QuintupleList class that is empty and has the default initial capacity.
|
||||
/// </summary>
|
||||
public QuintupleList() : base()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue