33
44namespace Platform . Collections . Arrays
55{
6- public class ArrayFiller < TElement , TReturnConstant >
6+ public class ArrayFiller < TElement >
77 {
8- private readonly TReturnConstant _returnConstant ;
98 protected readonly TElement [ ] _array ;
109 protected long _position ;
1110
12- public ArrayFiller ( TElement [ ] array , long offset , TReturnConstant returnConstant )
11+ public ArrayFiller ( TElement [ ] array , long offset )
1312 {
1413 _array = array ;
1514 _position = offset ;
16- _returnConstant = returnConstant ;
1715 }
1816
19- public ArrayFiller ( TElement [ ] array , TReturnConstant returnConstant )
20- : this ( array , 0 , returnConstant )
17+ public ArrayFiller ( TElement [ ] array )
18+ : this ( array , 0 )
2119 {
2220 }
2321
@@ -31,25 +29,11 @@ public bool AddAndReturnTrue(TElement element)
3129 return true ;
3230 }
3331
34- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
35- public TReturnConstant AddAndReturnConstant ( TElement element )
36- {
37- _array [ _position ++ ] = element ;
38- return _returnConstant ;
39- }
40-
4132 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
4233 public bool AddFirstAndReturnTrue ( IList < TElement > collection )
4334 {
4435 _array [ _position ++ ] = collection [ 0 ] ;
4536 return true ;
4637 }
47-
48- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
49- public TReturnConstant AddFirstAndReturnConstant ( IList < TElement > collection )
50- {
51- _array [ _position ++ ] = collection [ 0 ] ;
52- return _returnConstant ;
53- }
5438 }
5539}
0 commit comments