-
Notifications
You must be signed in to change notification settings - Fork 586
/
immutableObjectPrimitiveMap.stg
81 lines (61 loc) · 2.24 KB
/
immutableObjectPrimitiveMap.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
import "copyrightAndOthers.stg"
targetPath() ::= "org/eclipse/collections/api/map/primitive"
fileName(primitive) ::= "ImmutableObject<primitive.name>Map"
class(primitive) ::= <<
<body(primitive.type, primitive.name)>
>>
body(type, name) ::= <<
<copyrightAndOthers()>
package org.eclipse.collections.api.map.primitive;
import org.eclipse.collections.api.block.function.primitive.<name>ToObjectFunction;
import org.eclipse.collections.api.block.predicate.primitive.Object<name>Predicate;
import org.eclipse.collections.api.block.predicate.primitive.<name>Predicate;
import org.eclipse.collections.api.block.procedure.primitive.<name>Procedure;
import org.eclipse.collections.api.collection.ImmutableCollection;
import org.eclipse.collections.api.collection.primitive.Immutable<name>Collection;
/**
* This file was automatically generated from template file immutableObjectPrimitiveMap.stg.
*
* @since 3.0.
*/
public interface ImmutableObject<name>Map\<K> extends Object<name>Map\<K>
{
@Override
ImmutableObject<name>Map\<K> select(Object<name>Predicate\<? super K> predicate);
@Override
ImmutableObject<name>Map\<K> reject(Object<name>Predicate\<? super K> predicate);
@Override
Immutable<name>Collection select(<name>Predicate predicate);
@Override
Immutable<name>Collection reject(<name>Predicate predicate);
/**
* @since 9.0.
*/
default ImmutableObject<name>Map\<K> tap(<name>Procedure procedure)
{
this.forEach(procedure);
return this;
}
@Override
\<V> ImmutableCollection\<V> collect(<name>ToObjectFunction\<? extends V> function);
ImmutableObject<name>Map\<K> newWithKeyValue(K key, <type> value);
ImmutableObject<name>Map\<K> newWithoutKey(K key);
ImmutableObject<name>Map\<K> newWithoutAllKeys(Iterable\<? extends K> keys);
<(flipUniqueValues.(name))(name)>
}
>>
flipUniqueValues ::= [
"Byte": "flipUniqueValues",
"Short": "flipUniqueValues",
"Char": "flipUniqueValues",
"Int": "flipUniqueValues",
"Long": "flipUniqueValues",
"Float": "flipUniqueValues",
"Double": "flipUniqueValues",
"Boolean": "noMethods"
]
noMethods(type) ::= ""
flipUniqueValues(name) ::= <<
@Override
Immutable<name>ObjectMap\<K> flipUniqueValues();
>>