Class Pair

java.lang.Object
  |
  +--Pair

public final class Pair
extends java.lang.Object

This class provides an union structure to port Juergen's C code.
The union can contain a double word, a word or a byte.
0xFFFFFFFF.
This code is GPL. Copyright (c) 2000 Brice Fines.

  • This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
  • This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.
  • You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  • Version:
    0.2005 06/06/00
    Author:
    Jarod CANAL
    See Also:
    "The Gnu Public License."

    Field Summary
    private  int unsignedByte
              A table of 4 unsigned 8 bits integers that represents the union.
    0xFF FF FF FF
     
    Constructor Summary
    Pair()
              Constructor.
     
    Method Summary
    protected  int getDWord()
              Get the double word value of the union.
    0x FF FF FF FF
    protected  int getHighByte()
              Get the high byte value of the union.
    0x 00 00 FF 00
    protected  int getLowByte()
              Get the low byte value of the union.
    0x 00 00 00 FF
    protected  int getWord()
              Get the word value of the union.
    0x 00 00 FF FF
    protected  void setDWord(int Value)
              Set the union with a double word value.
    0xFF FF FF FF
    protected  void setHighByte(int Value)
              Set the high byte of the union with a value.
    0x 00 00 FF 00
    protected  void setLowByte(int Value)
              Set the low byte of the union with a value.
    0x 00 00 00 FF
    protected  void setWord(int Value)
              Set the union with a word value.
    0x 00 00 FF FF
     
    Methods inherited from class java.lang.Object
    , clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
     

    Field Detail

    unsignedByte

    private int unsignedByte
    A table of 4 unsigned 8 bits integers that represents the union.
    0xFF FF FF FF
    Constructor Detail

    Pair

    public Pair()
    Constructor.
    Method Detail

    setDWord

    protected final void setDWord(int Value)
    Set the union with a double word value.
    0xFF FF FF FF
    Parameters:
    Value - the value that will be used to set the union.

    setWord

    protected final void setWord(int Value)
    Set the union with a word value.
    0x 00 00 FF FF
    Parameters:
    Value - the value that will be used to set the union.

    setLowByte

    protected final void setLowByte(int Value)
    Set the low byte of the union with a value.
    0x 00 00 00 FF
    Parameters:
    Value - the value that will be used to set the union.

    setHighByte

    protected final void setHighByte(int Value)
    Set the high byte of the union with a value.
    0x 00 00 FF 00
    Parameters:
    Value - the value that will be used to set the union.

    getDWord

    protected final int getDWord()
    Get the double word value of the union.
    0x FF FF FF FF
    Returns:
    an unsigned 32 bits integer.

    getWord

    protected final int getWord()
    Get the word value of the union.
    0x 00 00 FF FF
    Returns:
    an unsigned 16 bits integer.

    getLowByte

    protected final int getLowByte()
    Get the low byte value of the union.
    0x 00 00 00 FF
    Returns:
    an unsigned 8 bits integer.

    getHighByte

    protected final int getHighByte()
    Get the high byte value of the union.
    0x 00 00 FF 00
    Returns:
    an unsigned 8 bits integer.