UartBus source documentation
VSigned.java
1 package eu.javaexperience.electronic.uartbus.rpc.datatype;
2 
3 import java.math.BigInteger;
4 
5 public final class VSigned
6 {
7  public final BigInteger value;
8  public VSigned(BigInteger dec)
9  {
10  this.value = dec;
11  }
12 
13  public VSigned(long dec)
14  {
15  this.value = BigInteger.valueOf(dec);
16  }
17 
18  @Override
19  public boolean equals(Object obj)
20  {
21  if(!(obj instanceof VSigned))
22  {
23  return false;
24  }
25 
26  return value.equals(((VSigned)obj).value);
27  }
28 
29  @Override
30  public int hashCode()
31  {
32  return value.hashCode();
33  }
34 
35  @Override
36  public String toString()
37  {
38  return "VSigned: "+value;
39  }
40 }