-
Notifications
You must be signed in to change notification settings - Fork 614
/
primitiveStack.stg
68 lines (53 loc) · 1.7 KB
/
primitiveStack.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
68
import "copyright.stg"
import "primitiveEquals.stg"
import "primitiveHashCode.stg"
import "primitiveAPI.stg"
targetPath() ::= "org/eclipse/collections/api/stack/primitive"
fileName(primitive) ::= "<primitive.name>Stack"
class(primitive) ::= <<
<body(primitive.type, primitive.name)>
>>
body(type, name) ::= <<
<copyright()>
package org.eclipse.collections.api.stack.primitive;
import org.eclipse.collections.api.block.function.primitive.<name>ToObjectFunction;
import org.eclipse.collections.api.block.predicate.primitive.<name>Predicate;
import org.eclipse.collections.api.list.primitive.<name>List;
import org.eclipse.collections.api.ordered.primitive.Ordered<name>Iterable;
import org.eclipse.collections.api.stack.StackIterable;
/**
* This file was automatically generated from template file primitiveStack.stg.
*
* @since 3.0.
*/
public interface <name>Stack extends Ordered<name>Iterable
{
/**
* Returns the top of the stack.
*/
<type> peek();
/**
* Returns <name>List of the number of elements specified by the count, beginning with the top of the stack.
*/
<name>List peek(int count);
/**
* Returns the element at the specified index.
*
* @param index the location to peek into
*/
<type> peekAt(int index);
<sharedAPI(fileName(primitive), name)>
\<V> StackIterable\<V> collect(<name>ToObjectFunction\<? extends V> function);
/**
* Follows the same general contract as {@link StackIterable#equals(Object)}.
*/
@Override
boolean equals(Object o);
/**
* Follows the same general contract as {@link StackIterable#hashCode()}.
*/
@Override
int hashCode();
Immutable<name>Stack toImmutable();
}
>>