示例#1
0
 /**
  * Returns the Java long value of the wrapped erlang value.
  *
  * @return the converted value
  * @throws ClassCastException if thrown if a conversion is not possible, i.e. the type is not
  *     supported or the value is too big
  */
 public long longValue() throws ClassCastException {
   final OtpErlangLong longValue = (OtpErlangLong) value;
   if (longValue.isLong()) {
     return longValue.longValue();
   } else {
     throw new ClassCastException(
         "Cannot cast to long - value is too big (use bigIntValue() instead).");
   }
 }