@Test void testNegativeBigInteger() { assertThrows(IllegalArgumentException.class, () -> { Gas.valueOf(BigInteger.valueOf(-123L)); }); }
public static Gas valueOf(UInt256 value) { if (value.compareTo(UINT256_MAX_CONSTANT) <= 0) { return CONSTANTS[value.intValue()]; } if (!value.fitsLong()) { throw new IllegalArgumentException("Gas value cannot be larger than 2^63 - 1"); } return new Gas(value.toLong()); }
Gas { public static Gas valueOf(UInt256 value) { if (value.compareTo(UINT256_MAX_CONSTANT) <= 0) { return CONSTANTS[value.intValue()]; } if (!value.fitsLong()) { throw new IllegalArgumentException("Gas value cannot be larger than 2^63 - 1"); } return new Gas(value.toLong()); } }
Gas { public static Gas valueOf(UInt256 value) { if (value.compareTo(UINT256_MAX_CONSTANT) <= 0) { return CONSTANTS[value.intValue()]; } if (!value.fitsLong()) { throw new IllegalArgumentException("Gas value cannot be larger than 2^63 - 1"); } return new Gas(value.toLong()); } private  Gas(long value); }
Gas { public static Gas valueOf(UInt256 value) { if (value.compareTo(UINT256_MAX_CONSTANT) <= 0) { return CONSTANTS[value.intValue()]; } if (!value.fitsLong()) { throw new IllegalArgumentException("Gas value cannot be larger than 2^63 - 1"); } return new Gas(value.toLong()); } private  Gas(long value); static Gas valueOf(UInt256 value); static Gas valueOf(long value); static Gas valueOf(BigInteger value); Wei priceFor(Wei gasPrice); Gas add(Gas other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); long toLong(); Bytes toBytes(); Bytes toMinimalBytes(); int compareTo(long other); }
Gas { public static Gas valueOf(UInt256 value) { if (value.compareTo(UINT256_MAX_CONSTANT) <= 0) { return CONSTANTS[value.intValue()]; } if (!value.fitsLong()) { throw new IllegalArgumentException("Gas value cannot be larger than 2^63 - 1"); } return new Gas(value.toLong()); } private  Gas(long value); static Gas valueOf(UInt256 value); static Gas valueOf(long value); static Gas valueOf(BigInteger value); Wei priceFor(Wei gasPrice); Gas add(Gas other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); long toLong(); Bytes toBytes(); Bytes toMinimalBytes(); int compareTo(long other);  }