Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 536837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:51:50+00:00 2026-05-13T09:51:50+00:00

I recently came across a module in my application which heavily uses Collections and

  • 0

I recently came across a module in my application which heavily uses Collections and Lists. And yeah its in Java. So either for performance reasons or whatsoever the author has used Lists and also maps in so many places. He does the usual operations on it like deleting some elements, adding, updating the list and every time he does that, he does it by traversing the entire list. Some times the lists are in the range of 10,000 elements.

Now my question here is why there isnt a language feature which facilitates this operation ? I mean why cant we have some rudimentary SQL which can be performed on the lists and collections ?? Is there any language which has this kind of feature ?

P.S: Well, I am not sure whether this is a bit subjective and against the SO rules. But I am strongly tempted to ask this here. May be the admins can place it right. So here goes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:51:50+00:00Added an answer on May 13, 2026 at 9:51 am

    Along with Google Collections, I’d recommend looking at LambdaJ:

    List<Person> sortedByAgePersons = new ArrayList<Person>(persons);
    Collections.sort(sortedByAgePersons, new Comparator<Person>() {
            public int compare(Person p1, Person p2) {
               return Integer.valueOf(p1.getAge()).compareTo(p2.getAge());
            }
    });
    

    becomes

    List<Person> sortedByAgePersons = sort(persons, on(Person.class).getAge());
    

    Lots of neat sorting, filtering and list manipulation functions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently came across a way to develop pluggable application modules when using ASP.NET
Recently came across pidgin . Its great, and does what I want, but I
I recently came across the pandas library for python, which according to this benchmark
I recently came across some Java code that simply put some strings into a
I recently came across this website: http://studiostyles.info , which contains a list of color
I recently came across a piece of Java code with WeakReferences - I had
I recently came across this blog post which basically says that we should not
I recently came across this blog post Yet another post about gamma correction which
I recently came across the Java DefaultMutableTreeNode class. I was wondering if there is
I recently came across the link below which I have found quite interesting. http://en.wikipedia.org/wiki/XOR_linked_list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.