code: public int indexOf(String labelText)
  	{
  		if (!labelMap.containsKey(labelText))
  			throw new IllegalArgumentException("The label \"" + labelText +
  				"\" is absent in pattern.");
  		
  		return labelMap.get(labelText);
  	}
docs: Gets the index of the given label. The label must exist, otherwise a runtime exception is
  thrown.
  @param labelText label to check
  @return index of the label