public void print(List<String> IdsToStrings,String pad) {
      Iterator<T> uniIter=UnigramCounts.keySet().iterator();
      T myValue;
      Double myVal;
      int getVal;
      if (pad==null) {
    	pad="";
      }
      
      while (uniIter.hasNext()) {
        myValue=uniIter.next();
        myVal=UnigramCounts.get(myValue);
        if ((IdsToStrings!=null) && (myValue instanceof Integer)) {
          getVal=((Integer)myValue).intValue();
          System.out.println(pad+"Unigram<"+myValue.getClass().getName()+">:"+IdsToStrings.get(getVal)+" and COUNT="+myVal);
        }
        else if (myValue instanceof BigramModel) {
           System.out.println(pad+"Unigram<"+myValue.getClass().getName()+">:"+((BigramModel)myValue).toString(IdsToStrings)+" and COUNT="+myVal);	
        }
        else {
          System.out.println(pad+"Unigram<"+myValue.getClass().getName()+">:"+myValue+" and COUNT="+myVal);
        }
      }
	}