Code example for LinkedHashMap

Methods: containsKey, get

0
    } 
    protected void init() { 
      mTones = new LinkedHashMap<Integer,Tone>();
    } 
    public Tone getTone(int position) {
      if (! mTones.containsKey(position)) {
        Tone t = this.cacheTone(position);
        mTones.put(position, t);
        return t;
      } 
      return mTones.get(position);
    } 
    abstract protected Tone cacheTone(int position);
 
    public int getCount() { return mCursor.getCount(); }
 
    protected void finalize() { if (mCursor != null) mCursor.close(); }
  } 
 
  class BuiltinToneCursor extends ToneCursor 
  {