Questions tagged [eclipse-collections]

Questions related to Eclipse Collections, which is a collections framework for java and contains some improved collection types such as ListIterable, BiMap, Bag and MultiMap.

Eclipse Collections is a collections framework for Java. It has JDK-compatible List, Set and Map implementations with a rich API and set of utility classes that work with any JDK compatible Collections, Arrays, Maps or Strings. The iteration protocol was inspired by the Smalltalk collection framework.

Eclipse Collections grew out of GS Collections.

23 questions
8
votes
2 answers

Create an IntStream and a Stream from an Eclipse Collections IntList/IntIterable

I have an Eclipse Collections IntList. How can I Create a Java IntStream from this list Create a Java Stream from this list without copying the elements?
Jochen
  • 7,270
  • 5
  • 24
  • 32
6
votes
1 answer

Integration Eclipse Collections with Spring Data JPA

is it possible integration eclipse collections with spring data jpa + hibernate? for example: import org.springframework.data.jpa.repository.JpaRepository; import org.eclipse.collections.api.list.ImmutableList; public interface UserRepository…
4
votes
2 answers

How to use Eclipse collection in Spring boot ResponseEnity in Java

So I need help in using java eclipse collections as part of the response using the spring boot Response Entity JSON . I have tried using the generic way but I get a response exception error that it failed to convert to java ArrayList type so can…
kinsley kajiva
  • 1,840
  • 1
  • 21
  • 26
4
votes
1 answer

Did Eclipse Collections get deprecated by Java 8?

I recently stumbled across Eclipse Collections, and they look awesome - pretty much about as awesome as Java 8 streams looked. I read through a few introductions, presentations and tutorials, and it seems like pretty much everything EC added, you…
Torque
  • 3,319
  • 2
  • 27
  • 39
3
votes
1 answer

How convert/adapt ByteObjectHashMap to a JDK Map?

Primitive maps don't seem to implement java.util.Map. If I have a function, accepting JDK Map as an argument and now want to pass eclipse collection implementation, for example ByteObjectHashMap, what's the easiest way to do that? it stated here,…
user2104560
3
votes
3 answers

Eclipse Collections sorting an IntList by a custom comparator-like function without boxing

I'm trying to sort a few (Mutable)IntList objects. The cost of boxing/unboxing integers is relevant in my program (which is exactly why I am using the primitive collections). I want to sort by the following criteria: All negative numbers come…
Jochem Kuijpers
  • 1,770
  • 3
  • 17
  • 34
3
votes
1 answer

Why are most eclipse collections types Serializable?

I'm looking for design rationale here. I can understand making collection classes Serializable as a matter of course, although JCF doesn't do that. Nevertheless, the Procedure, IntProcedure, etc. interfaces in particular are prime candidates for not…
willkil
  • 1,619
  • 1
  • 21
  • 33
2
votes
2 answers

Eclipse Collections - Is there a containsAny() method for Sets?

I can't seem to find a containsAny() method for SetIterable types in Eclipse Collections. Is there one? MutableSet set1 = Sets.mutable.of("a", "b", "c"); ImmutableSet set2 = Sets.immutable.of("c", "d", "e"); set1.containsAny(set2);…
Luke
  • 2,151
  • 3
  • 17
  • 15
2
votes
2 answers

IntelliJ Java Type Renderers for Eclipse Collections with primitives

I have found Eclipse Collections very useful. Especially collections for primitive types (for example: IntObjectHashMap). Unfortunately there is a problem with rendering these collections in IntelliJ IDEA debugger. Let's have a sample code: import…
adaslaw
  • 170
  • 11
2
votes
1 answer

Map with soft values in Eclipse Collections

I am currently looking at consolidating to a single collections library in a project I'm involved in, and though I have little experience with it, I really like the look of Eclipse Collections. One concrete use case we have is that we use a Map…
Jeen Broekstra
  • 21,642
  • 4
  • 51
  • 73
2
votes
1 answer

Resources for understanding Fastutil internals

I'm looking for resources to understand how Java datatypes are implemented internally, and how libraries like Fastutil and Eclipse Collections provide faster implementations of the same. I tired looking through the codebases on Github…
2
votes
1 answer

Using the Eclipse Collections library, how do I sort MutableMap on the value?

Suppose I have MutableMap, and I want to sort on the Integer value. What would be the recommended way to do that with this library? Is there a utility or method or recommended way of going about this with the Eclipse Collections…
rs99483
  • 75
  • 4
2
votes
2 answers

Eclipse Collection usages on production code

https://www.eclipse.org/collections/ seems to be getting popular now a days. Just wonder, if anybody has used this library in their production code and how is the overall experience.
user3310917
  • 405
  • 5
  • 13
2
votes
1 answer

HashBag in-place remove

There are a large number of elements saved in a HashBag (of Eclipse Collections framework). Now all elements with less than k occurrences should be removed. This could be done with: bag.removeAll(bag.selectByOccurrences(n->n
pakat
  • 286
  • 2
  • 5
1
vote
1 answer

How to create nested groups using Eclipse Collection's Multimap?

I have read Map vs. Multimap with great interest. Multimaps are indeed a commonly used concept for which there's no standard JDK type. As I am still exploring the Eclipse Collections library, I do have some questions about the usage of Eclipse…
Erwin Dupont
  • 547
  • 4
  • 11
1
2