title: Instantiate a hashmap by a specified object
body: <p>I want to make a constructor for a class called <code>Manager</code> which takes as argument <code>Object</code>:</p>
  
  <pre><code>public class Manager{
      public Manager(Object object){}
  } 
  </code></pre>
  
  <p>In this constructor i want to instantiate a non-local HashMap object that uses <code>String</code>  and the constructor parameter <code>object</code>, so it will be something like that:</p>
  
  <pre><code>public class Manager{
      private HashMap objects;
      public Manager(Object object){
          objects = new HashMap&lt;String, object&gt;(); /*note it's 'object' and not 'Object'*/
      }
  }
  </code></pre>
  
  <p>So that if from example i will instantiate a manager i will be able to do something like this:</p>
  
  <pre><code>Manager myObjectManager = new Manager(MyObject); /* Create a new Manager instance with MyObject object for an example */
  myObjectManager.getDescription(); /* Use a method from the MyObject class
  </code></pre>
  
  <p>I know the examples i provided are not using a right syntax of java, i have only used java to describe what i'm looking for.</p>
  
  <p>What i'm just trying to explain is that i want a  constructor that could instantiate a HashMap object by using the constructor parameters.</p>
  
  <p><strong>edit</strong>: i'll try to explain better, the manager class is supposed to hold objects from the same class and use the string to find them. for an example i'll use a spritesheet manager which i'll use to find a spritesheet of the player.</p>