-
Notifications
You must be signed in to change notification settings - Fork 614
/
immutablePrimitiveBag.stg
67 lines (54 loc) · 2.06 KB
/
immutablePrimitiveBag.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 "copyright.stg"
import "primitiveAPI.stg"
targetPath() ::= "org/eclipse/collections/api/bag/primitive"
fileName(primitive) ::= "Immutable<primitive.name>Bag"
class(primitive) ::= <<
<body(primitive.type, primitive.name)>
>>
body(type, name) ::= <<
<copyright()>
package org.eclipse.collections.api.bag.primitive;
import org.eclipse.collections.api.<name>Iterable;
import org.eclipse.collections.api.bag.ImmutableBag;
import org.eclipse.collections.api.block.function.primitive.<name>ToObjectFunction;
import org.eclipse.collections.api.block.predicate.primitive.IntPredicate;
import org.eclipse.collections.api.block.predicate.primitive.<name>Predicate;
import org.eclipse.collections.api.collection.primitive.Immutable<name>Collection;
import org.eclipse.collections.api.list.ImmutableList;
import org.eclipse.collections.api.tuple.primitive.<name>IntPair;
/**
* This file was automatically generated from template file immutablePrimitiveBag.stg.
*
* @since 3.0.
*/
public interface Immutable<name>Bag extends Immutable<name>Collection, <name>Bag
{
<sharedAPI(fileName(primitive), name)>
/**
* Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
*
* @since 8.0
*/
Immutable<name>Bag selectByOccurrences(IntPredicate predicate);
/**
* Returns the {@code count} most frequently occurring items.
*
* In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last
* item will be returned.
*
* @since 8.0
*/
ImmutableList\<<name>IntPair> topOccurrences(int count);
/**
* Returns the {@code count} least frequently occurring items.
*
* In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last
* item will be returned.
*
* @since 8.0
*/
ImmutableList\<<name>IntPair> bottomOccurrences(int count);
\<V> ImmutableBag\<V> collect(<name>ToObjectFunction\<? extends V> function);
<immutableAPI(fileName(primitive), type, name)>
}
>>