Results 1 to 2 of 2
  1. #1
    piyrwq is offline Member
    Join Date
    Apr 2014
    Rep Power

    Default CoalescedHashMap

    I am attempting to make a CoalescedHashMap<K, V> with internal chaining. It isn't a hard concept, but it needs to extend AbstractSet and implement Map<K, V>.

    Map requires a remove method that returns a V(value). AbstractSet extends Collection, which requires a remove method that returns a boolean value. It gives a syntax error either way it is done. This is a standard homework assignment for a junior level class, so there must be some way to deal with this. It is annoying as we do not need to implement the remove method, it just throws and exception.

    My teacher is pretty much useless for answering questions. The best he can do is to cut-n-paste something from the assignment directions, which are not very detailed.
    Last edited by piyrwq; 04-03-2014 at 05:14 AM.

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Northern Virginia, United States
    Rep Power

    Default Re: CoalescedHashMap

    Please provide a Short, Self Contained, Correct Example that demonstrates the problem.

    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Posting Permissions

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