Code example for TreeMap

Methods: get, lastKey, size

0
    /** 
     * Fetches the largest available image for the drink. 
     * @return Image url or null if no images are available. 
     */ 
    public String getLargestImageUrl() {
    	if(null != mImages && mImages.size() > 0)
    		return mImages.get(mImages.lastKey());
 
    	return null; 
    } 
 
    /** 
     * Fetches the smallest available image for the drink. 
     * @return Image url or null if no images are available. 
     */ 
    public String getSmallestImageUrl() {
    	if(null != mImages && mImages.size() > 0)
    		return mImages.get(mImages.firstKey());
    	 
    	return null; 
    }