From 8189116ea4b5db4675e31dfd04a5687d55e29262 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Tue, 6 May 2014 14:29:37 +0100 Subject: Added javadocs, made minor changes to the comments --- doc/jcgp/backend/function/UnsignedInteger.html | 364 +++++++++++++++++++++++++ 1 file changed, 364 insertions(+) create mode 100644 doc/jcgp/backend/function/UnsignedInteger.html (limited to 'doc/jcgp/backend/function/UnsignedInteger.html') diff --git a/doc/jcgp/backend/function/UnsignedInteger.html b/doc/jcgp/backend/function/UnsignedInteger.html new file mode 100644 index 0000000..ca02b07 --- /dev/null +++ b/doc/jcgp/backend/function/UnsignedInteger.html @@ -0,0 +1,364 @@ + + + + + +UnsignedInteger + + + + + + + + +
+ + + + + + + +
+ + + +
+
jcgp.backend.function
+

Class UnsignedInteger

+
+
+ +
+
    +
  • +
    +
    +
    public class UnsignedInteger
    +extends java.lang.Object
    +
    Integer wrapper type for unsigned integer values. +

    + Java offers no support for unsigned types save from + unsigned conversion methods. This class uses those methods + to simulate the unsigned int data type, useful for circuit + truth table encodings. +

    + When a string representation of an unsigned integer is parsed + using Integer.parseUnsignedInt(), an Integer is created using + all 32 bits for unsigned magnitude. The integer however is still + signed and will behave as such for all arithmetic operations. + Bitwise operations can still be performed as they work at the bit + level, making this data type particularly suitable for circuit design. +

    + TODO in the unlikely event that unsigned integers are natively + implemented in Java, they should be used instead of this class. +

    + Why are unsigned integers not supported?
    + http://stackoverflow.com/questions/430346/why-doesnt-java-support-unsigned-ints
    +
    +
    Author:
    +
    Eduardo Pedroni
    +
    See Also:
    +
    Integer
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      UnsignedInteger(int i) +
      Makes a new instance of UnsignedInteger with a specified value.
      +
      UnsignedInteger(java.lang.Integer i) +
      Makes a new instance of UnsignedInteger with a specified value.
      +
      UnsignedInteger(java.lang.String i) +
      Makes a new instance of UnsignedInteger from the string representation + of an unsigned integer.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.Integerget() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UnsignedInteger

        +
        public UnsignedInteger(int i)
        +
        Makes a new instance of UnsignedInteger with a specified value.
        +
        +
        Parameters:
        +
        i - the value with which to initialise.
        +
        +
      • +
      + + + +
        +
      • +

        UnsignedInteger

        +
        public UnsignedInteger(java.lang.Integer i)
        +
        Makes a new instance of UnsignedInteger with a specified value.
        +
        +
        Parameters:
        +
        i - the value with which to initialise.
        +
        +
      • +
      + + + +
        +
      • +

        UnsignedInteger

        +
        public UnsignedInteger(java.lang.String i)
        +
        Makes a new instance of UnsignedInteger from the string representation + of an unsigned integer.
        +
        +
        Parameters:
        +
        i - the string with which to initialise.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        get

        +
        public java.lang.Integer get()
        +
        +
        Returns:
        +
        the wrapped Integer object.
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + -- cgit v1.2.3