Results 1 to 2 of 2
  1. #1
    wulfgarpro is offline Member
    Join Date
    Sep 2010
    Rep Power

    Default Collection Interator


    Java Code:
    static void filter(Collection<?> c) {
        for (Iterator<?> it = c.iterator(); it.hasNext(); )
            if (!cond(
    What exactly does !cond mean ? I cant seem to see any boolean variables.. is this pseudo ?


  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    cond is a method (and is one that we currently don't see the declaration or the body) that is in the current class and it must take an Object as a parameter and return a boolean result.

Similar Threads

  1. how to use genirics in collection
    By ashokreddy.narra in forum New To Java
    Replies: 3
    Last Post: 08-10-2010, 09:33 AM
  2. help for collection api
    By javastuden in forum New To Java
    Replies: 3
    Last Post: 02-24-2010, 11:52 AM
  3. Collection Types
    By DavidG24 in forum New To Java
    Replies: 2
    Last Post: 04-18-2009, 05:03 PM
  4. How to get NamingEnumeration from my collection?
    By hencre in forum Advanced Java
    Replies: 1
    Last Post: 10-18-2008, 08:01 PM
  5. Collection - java
    By Moonlightkid in forum Advanced Java
    Replies: 3
    Last Post: 09-02-2008, 05:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts