synchronized List<Long> keys(boolean cold,boolean nonResident){
  ArrayList<Long> keys=new ArrayList<Long>();
  if (cold) {
    Entry<V> start=nonResident ? queue2 : queue;
    for (Entry<V> e=start.queueNext; e != start; e=e.queueNext) {
      keys.add(e.key);
    }
  }
 else {
    for (Entry<V> e=stack.stackNext; e != stack; e=e.stackNext) {
      keys.add(e.key);
    }
  }
  return keys;
}

synchronized List < Long > keys ( boolean cold , boolean nonResident ) { ArrayList < Long > keys = new ArrayList < Long > ( ) ; if ( cold ) { Entry < V > start = nonResident ? queue2 : queue ; for ( Entry < V > e = start . queueNext ; e != start ; e = e . queueNext ) { keys . add ( e . key ) ; } } else { for ( Entry < V > e = stack . stackNext ; e != stack ; e = e . stackNext ) { keys . add ( e . key ) ; } } return keys ; }
get the list of keys . this method allows to read the internal state of the cache .
