title: How to implement Map in singleton class?
body: <p>I have the task to make a program about Florist's. I have to make a class PriceList, which is a singleton. I have also a following given testing function main:</p>
  
  <pre><code> public static void main(String[] args) {
   PriceList pl = PriceList.getInstance();
   pl.put("rose", 10.0);
   pl.put("lilac", 12.0);
   pl.put("peony", 8.0);
  </code></pre>
  
  <p>Looking on these pl.puts(), I decided to implement Map interface in class PriceList, but I don't know exactly how to do it, when I have only one object of this class and it has to be a Map. I have already written that much and don't know what to do next:</p>
  
  <pre><code>public class PriceList &lt;String, Double&gt;  implements Map &lt;String, Double&gt; {
  
  private static PriceList instance = null;
  
  protected PriceList() {}
  
  public static PriceList getInstance() {
      if (instance == null)
          instance = new PriceList();
      return instance;
  }
  
  public void put(String string, double d) {
      // TODO Auto-generated method stub
  
  }}
  </code></pre>
  
  <p>Thanks in advance for any help!</p>