#incompatible types: Position<Entry<K,V>> cannot be converted to Position<Position<Entry<K,V>>>

3 messages · Page 1 of 1 (latest)

wispy minnow
#

The images are the two methods that are giving me troubles in my adaptablePQ class and NodePositionList class. The NPL class was made by my prof so it shouldn't have to be edited. The next() method I am invoking takes a Position<E> object and returns a Position<E>. I am not sure why its trying to cast to a nested posEntry and I am not sure how to fix this.

Full code if anyone was interested: https://gist.github.com/DaddyPMA/99be770e261695a1652de7a69aae8d70

Gist

Give a Java implementation of the adoptable priority queue based on a sorted list. You are required to use a default comparator (built in Java) and a comparator for nonnegative integers that determ...

fathom kiteBOT
#

This post has been reserved for your question.

Hey @wispy minnow! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.