1

I' looking for an equivalent of Java NavigableSet object in objective-C, especially to get the pollFirst method.

Any ideas ?

EDIT : Documentation of NavigableSet : https://docs.oracle.com/javase/7/docs/api/java/util/NavigableSet.html

A SortedSet extended with navigation methods reporting closest matches for given search targets.

This interface additionally defines methods pollFirst and pollLast that return and remove the lowest and highest element, if one exists, else returning null.

Thanks in advance !

Community
  • 1
  • 1
Randy
  • 4,335
  • 3
  • 30
  • 64
  • what does `NavigableSet ` exactly does? – Bista Jan 11 '16 at 10:01
  • I see that there are lots of methods that inherit `NavigableSet`? Can you list few whose equivalent you need. – Bista Jan 11 '16 at 11:02
  • Thanks for your answers, I actually only need the pollFirst() method – Randy Jan 11 '16 at 11:05
  • `PollFirst` is implemented on Linked Lists..On which kind of property you want to implement it in iOS? – Bista Jan 11 '16 at 11:09
  • I have not decided yet, the best would probably be on NSOrderedSet, don't you think so ? – Randy Jan 11 '16 at 11:16
  • 1
    http://stackoverflow.com/questions/3826789/getting-an-object-from-an-nsset.... By the way i know you want to know some general answer, but I didn't found any equivalent. – Bista Jan 11 '16 at 11:35
  • 1
    Yes ok, I had seen that, I was hoping that some magician would know a solution :) Thanks anyway – Randy Jan 11 '16 at 12:56

0 Answers0