-
Notifications
You must be signed in to change notification settings - Fork 606
/
reversiblePrimitiveIterable.stg
67 lines (52 loc) · 1.94 KB
/
reversiblePrimitiveIterable.stg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import "copyrightAndOthers.stg"
import "primitiveEquals.stg"
import "primitiveHashCode.stg"
import "primitiveAPI.stg"
import "primitiveLiteral.stg"
targetPath() ::= "org/eclipse/collections/api/ordered/primitive"
fileName(primitive) ::= "Reversible<primitive.name>Iterable"
class(primitive) ::= <<
<body(primitive.type, primitive.name)>
>>
body(type, name) ::= <<
<copyrightAndOthers()>
package org.eclipse.collections.api.ordered.primitive;
import org.eclipse.collections.api.Lazy<name>Iterable;
import org.eclipse.collections.api.block.function.primitive.<name>IntToObjectFunction;
import org.eclipse.collections.api.block.function.primitive.<name>ToObjectFunction;
import org.eclipse.collections.api.block.function.primitive.Object<name>IntToObjectFunction;
import org.eclipse.collections.api.block.predicate.primitive.<name>Predicate;
import org.eclipse.collections.api.ordered.ReversibleIterable;
/**
* This file was automatically generated from template file reversiblePrimitiveIterable.stg.
*
* @since 5.0.
*/
public interface Reversible<name>Iterable extends Ordered<name>Iterable
{
<type> getLast();
Lazy<name>Iterable asReversed();
<sharedAPI(fileName(primitive), name)>
@Override
\<V> ReversibleIterable\<V> collect(<name>ToObjectFunction\<? extends V> function);
/**
* Returns a new ReversibleIterable using results obtained by applying the specified function to each element
* and its corresponding index.
*
* @since 9.1.
*/
@Override
default \<V> ReversibleIterable\<V> collectWithIndex(<name>IntToObjectFunction\<? extends V> function)
{
int[] index = {0};
return this.collect(each -> function.value(each, index[0]++));
}
Reversible<name>Iterable toReversed();
/**
* @since 6.0.
*/
Reversible<name>Iterable distinct();
@Override
\<T> T injectIntoWithIndex(T injectedValue, Object<name>IntToObjectFunction\<? super T, ? extends T> function);
}
>>