l2jkain Posted December 1, 2017 Share Posted December 1, 2017 FastSet in java 8 which replaces? ArrayList? Quote Link to comment Share on other sites More sharing options...
0 Tryskell Posted December 1, 2017 Share Posted December 1, 2017 (edited) Depends what's the container is supposed to do. If the order of insertion must be kept, it can be also a LinkedList. If it must be concurrent and ordered, ConcurrentSkipListSet. If it's only concurrent, then CopyOnWriteArrayList got shitty performance, avoid to use it at any cost. Use ConcurrentHashMap.newKeySet() instead (which feed one column with boolean) in order to benefit from performance boost of CHMap. All in one, it can be replaced in most of cases by a simple ArrayList (it's pretty rare to need concurrent or order, and even rarer to need both). Once again, it depends what does your container. Edited December 1, 2017 by Tryskell Quote Link to comment Share on other sites More sharing options...
0 SweeTs Posted December 1, 2017 Share Posted December 1, 2017 Could use HashSet as well :p Quote Link to comment Share on other sites More sharing options...
Question
l2jkain
FastSet in java 8 which replaces? ArrayList?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.