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

  • Home
  • SEARCH
  • 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 6030649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:04:06+00:00 2026-05-23T05:04:06+00:00

Is there a java collection class that provides a filter method? I’m a little

  • 0

Is there a java collection class that provides a filter method? I’m a little new to java so navigating all the collection classes and all the subtle ways they intertwine with interfaces is a little confusing. What I would like is a collection class that does the following:

FilterableCollection<SomeClass> collection = new FilterableCollection<SomeClass>();

// add some elements to the collection

// filter the collection and only keep certain elements
FilterableCollection<SomeClass> filtered_collection = collection.filter(
  new Filter<SomeClass>() {
    @Override
    public boolean test(SomeClass obj) {
      // determine whether obj passes the test or not
    }
  }
);
  • 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-23T05:04:07+00:00Added an answer on May 23, 2026 at 5:04 am

    Check out this post. What is the best way to filter a Java Collection? It has a great example and should be exactly what you’re looking for.

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

Sidebar

Related Questions

Is there any collection class in java, that implements push_back() and push_front() methods?
Is there any built-in functionality for classical set operations on the java.util.Collection class? My
In Java there are methods to go about scanning the classpath/all classes/within a package
Disclaimer: I'm completely new to Java EE/EJB and all that, so bear with me.
Is there a standard Java (1.5+) implementation (i.e. no 3rd party) of a collection
Does anyone know if there is a good equivalent to Java's Set collection in
Is there a Generics Friendly way of using Collection.EMPTY_LIST in my Java Program. I
Is there any Java library that supports hierarchical column? For example (the first three
Is there anything in Java that implements something like the following interface MSet<T> extends
In Java is there anyway to have one constructor that will accept an array

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.