Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

apache-commons-collection

Java Commons Collections removeAll

December 15, 2023 by Tarik

Edit January 1, 2014 Apache Commons Collections 4.0 was finally released on November 21, 2013, and contains a fix for this issue. Link to CollectionUtils.java Lines in question (1688 – 1691), with acknowledgement the method was previously broken: /* … * @since 4.0 (method existed in 3.2 but was completely broken) */ public static <E> … Read more

Categories java Tags apache-commons-collection, collections, java Leave a comment

How to convert a Collection to List?

September 26, 2022 by Tarik

List list = new ArrayList(coll); Collections.sort(list); As Erel Segal Halevi says below, if coll is already a list, you can skip step one. But that would depend on the internals of TreeBidiMap. List list; if (coll instanceof List) list = (List)coll; else list = new ArrayList(coll);

Categories java Tags apache-commons-collection, collections, java, list, sorting Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa