Note that there are some explanatory texts on larger screens.

plurals
  1. POC# nested private classes
    primarykey
    data
    text
    <p>I am creating my own priority queue of sorts. It is not a typical priority queue in that items are inserted with a given priority. Rather items can be added to the queue and they begin at the highest priority(let say we have 5 queues, queue 1=highest priority, queue5=lowest)), so the item is added to queue 1 initially.</p> <p>The user of this data structure can get the next() element, which returns an element based on some factors that I am interested in, namely the priority, but it is not dequeued from the entire data structure. The user provides some feedback to the validity of the item returned from the previous call to next()(eg. a pass/fail result), and based on that, the item is moved up or down in priority. Basically, elements that fail get used less often and I have mechanisms to eventually remove elements that fail too often.</p> <p>1)Any suggestions to improve the interface? I do not like having to retrieve an element from the next() call and then provide feedback with another function call. There is too much room for error where the state gets messed up. (ie user does not report result before getting next element..etc...). Also, it would be desireable to allow this to be thread safe.</p> <p>2)I am using a private nested class that wraps the elements I am interested in along with some attributes associated with each element to track statistics on the element(eg pass/fail counts etc...), and would like to know if there was a way to access the outer class members from the inner class?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload