Results 1 to 2 of 2

Thread: HashMap problem

  1. #1
    vince8864 is offline Member
    Join Date
    Feb 2012
    Rep Power

    Default HashMap problem

    public HashMap extractOids(Mib mib){

    HashMap map = new HashMap();
    Iterator iter = mib.getAllSymbols().iterator();
    MibSymbol symbol;
    MibValue value;

    while (iter.hasNext()) {
    symbol = (MibSymbol);
    value = extractOid(symbol);
    if (value !=null){

    return map;

    How do i call the method above and handle the map type return properly? Thanks

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: HashMap problem

    Call it, passing in a Mib parameter.
    Handle the HashMap by assigning the return value to a HashMap object.
    Java Code:
    HashMap map = extractOids(mibObject);
    Not sure what else you expect anyone to say.

Similar Threads

  1. hashmap or search problem
    By flushdabuffer in forum Android
    Replies: 0
    Last Post: 04-09-2011, 01:55 PM
  2. hashmap problem
    By minotaurus in forum Advanced Java
    Replies: 5
    Last Post: 03-16-2011, 11:24 AM
  3. Problem with HashMap
    By maz09 in forum New To Java
    Replies: 2
    Last Post: 04-14-2010, 09:40 PM
  4. problem with removing element from HashMap
    By checho in forum New To Java
    Replies: 15
    Last Post: 01-10-2010, 01:10 PM
  5. Iterating through HashMap problem
    By JordashTalon in forum New To Java
    Replies: 1
    Last Post: 01-28-2009, 11:28 PM

Posting Permissions

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