com.io7m.jpra.compiler.java

## Class JPRAMasks

- java.lang.Object
- - com.io7m.jpra.compiler.java.JPRAMasks

-     public final class JPRAMasks
      extends Object

  Functions to create bit masks.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `createOneMask(int size, int lsb, int msb)` Create a mask of `size` bits, where the bits from the inclusive range `[lsb, msb]` are set to `0` and the rest are set to `1`.
    `static String` | `createZeroMask(int size, int lsb, int msb)` Create a mask of `size` bits, where the bits from the inclusive range `[lsb, msb]` are set to `0` and the rest are set to `1`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createZeroMask

          public static String createZeroMask(int size,
                                              int lsb,
                                              int msb)

      Create a mask of `size` bits, where the bits from the inclusive range `[lsb, msb]` are set to `0` and the rest are set to `1`.
      Parameters:
        `size` - The mask size
        `lsb` - The least significant bit index
        `msb` - The most significant bit index
      Returns:
        A mask string

    - #### createOneMask

          public static String createOneMask(int size,
                                             int lsb,
                                             int msb)

      Create a mask of `size` bits, where the bits from the inclusive range `[lsb, msb]` are set to `0` and the rest are set to `1`.
      Parameters:
        `size` - The mask size
        `lsb` - The least significant bit index
        `msb` - The most significant bit index
      Returns:
        A mask string

Copyright © 2017 <code@io7m.com> http://io7m.com