Class Field

java.lang.Object
  |
  +--Field

public class Field
extends java.lang.Object

A Field is a contiguous group of bits in an integer.


Constructor Summary
Field(int s)
          new Field(s) returns a new field with start bit number s and width 1.
Field(int s, int w)
          new Field(s, w) returns a new field with start bit number s and width w.
 
Method Summary
 int get(int n)
          fld.get(n) returns the bit field fld of n.
 int set(int n, int v)
          fld.set(n, v) returns n with its bit field fld set to v.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Field

public Field(int s)
new Field(s) returns a new field with start bit number s and width 1.

Preconditions:


Field

public Field(int s,
             int w)
new Field(s, w) returns a new field with start bit number s and width w.

Preconditions:

Method Detail

get

public int get(int n)
fld.get(n) returns the bit field fld of n.


set

public int set(int n,
               int v)
fld.set(n, v) returns n with its bit field fld set to v.