code: private static long longValue(Object attributeValue)
           throws NumberFormatException {
  
          if (attributeValue instanceof Number) {
              return (((Number) attributeValue).longValue());
          } else {
              return (Long.parseLong(attributeValue.toString()));
          }
  
      }
docs: <p>Return the specified attribute value, converted to a
  <code>long</code>.</p>
  
  @param attributeValue The attribute value to be converted
  @throws NumberFormatException if conversion is not possible