title: Is my code falls into any design pattern ?
body: <p>I have this piece of code:</p>
  
  <pre><code>private String objectToString(Object obj){
  if (obj instanceof String)
      return (String)obj;
  if (obj instanceof Struct){
      Map&lt;String,?&gt; map = ((Struct)obj).getMembers();
       return map.toString();
   }
  Class c = obj.getClass();
  if (c.isArray())
  {
      //obj. iterate elements and return values;
      return obj.toString();//to redi this
  
  }
  //this is for any other datatypes
  else
      return obj.toString();
  </code></pre>
  
  <p>}</p>
  
  <p>Can someone suggest if this falls into any design patterns from GOF.Code is straightforward but just to clarify it looks at the parameter passed and depending on the type returning the string in a human readable form back.</p>