/
mutablePrimitiveSetFactory.stg
101 lines (81 loc) · 2.08 KB
/
mutablePrimitiveSetFactory.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import "copyrightAndOthers.stg"
targetPath() ::= "org/eclipse/collections/api/factory/set/primitive"
fileName(primitive) ::= "Mutable<primitive.name>SetFactory"
class(primitive) ::= <<
<body(primitive.type, primitive.name)>
>>
body(type, name) ::= <<
<copyrightAndOthers()>
package org.eclipse.collections.api.factory.set.primitive;
import org.eclipse.collections.api.<name>Iterable;
import org.eclipse.collections.api.set.primitive.Mutable<name>Set;
<(wideStreamImport.(type))>
/**
* A factory which creates instances of type {@link Mutable<name>Set}.
* This file was automatically generated from template file mutablePrimitiveSetFactory.stg.
*
* @since 6.0.
*/
public interface Mutable<name>SetFactory
{
Mutable<name>Set empty();
/**
* Same as {@link #empty()}.
*/
Mutable<name>Set of();
/**
* Same as {@link #empty()}.
*/
Mutable<name>Set with();
/**
* Same as {@link #with(<type>[])}.
*/
Mutable<name>Set of(<type>... items);
Mutable<name>Set with(<type>... items);
/**
* Same as {@link #withAll(<name>Iterable)}.
*/
Mutable<name>Set ofAll(<name>Iterable items);
Mutable<name>Set withAll(<name>Iterable items);
<(streamMethods.(type))()>
}
>>
streamMethods ::= [
"byte": "noMethods",
"short": "noMethods",
"char": "noMethods",
"int": "allMethods",
"long": "allMethods",
"float": "noMethods",
"double": "allMethods",
"boolean": "noMethods"
]
allMethods() ::= <<
<\n>
/**
* @since 9.0
*/
Mutable<name>Set ofAll(<(wideStream.(type))> items);
/**
* @since 9.0
*/
Mutable<name>Set withAll(<(wideStream.(type))> items);
>>
noMethods() ::= ""
wideStream ::= [
"int": "IntStream",
"long": "LongStream",
"double": "DoubleStream",
default: "no matching wide type"
]
wideStreamImport ::= [
"boolean": "",
"byte": "",
"short": "",
"char": "",
"int": "import java.util.stream.IntStream;",
"long": "import java.util.stream.LongStream;",
"float": "",
"double": "import java.util.stream.DoubleStream;",
default: "no matching wide type"
]