if (layerNum == layer)
if (layerNum.intValue() == layer.intValue())
  protected int[] layerToRange (Integer layer)  {    int[] ret = new int[2];    ret[1] = getComponents ().length;    Iterator i = layers.entrySet ().iterator ();    while (i.hasNext())	    {        Map.Entry pair = (Map.Entry) i.next();        Integer layerNum = (Integer) pair.getKey ();        Integer layerSz = (Integer) pair.getValue ();        if (layerNum == layer)          {            ret[0] = ret[1] - layerSz.intValue ();            return ret;          }        else          {            ret[1] -= layerSz.intValue ();          }	    }    // should have found the layer during iteration    throw new IllegalArgumentException ();  }