All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pointer.PByte

java.lang.Object
   |
   +----pointer.Pointer
           |
           +----pointer.PByte

public class PByte
extends Pointer
This is a pointer to a byte, used for pass-by-reference calls. Passing the pointer to a method allows that method to change the value.

This code is (c) 1996 Leemon Baird <leemon@cs.cmu.edu>, http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely. If the code is modified, please state so in the comments.

Version:
1.0, 9 May 96
Author:
Leemon Baird

Variable Index

 o val
The value which is pointed to.

Constructor Index

 o PByte(byte)
The value can be initialized by the constructor

Method Index

 o clone()
Create a new object of the same type with the same value
 o copyInto(Pointer)
Copy the value of this object into another of the same type
 o equalVal(Pointer)
Does this pointer and the other have the same value? Different types , such as (int)3 and (long)3 are defined to have different values.
 o toDouble()
If a pointer to a numeric type, convert the .val field to a double, else just return 0.
 o toString()
pointers convert to strings just as their values convert

Variables

 o val
 public byte val
The value which is pointed to.

Constructors

 o PByte
 public PByte(byte initVal)
The value can be initialized by the constructor

Methods

 o clone
 public final Object clone()
Create a new object of the same type with the same value

Overrides:
clone in class Pointer
 o copyInto
 public final void copyInto(Pointer obj)
Copy the value of this object into another of the same type

Overrides:
copyInto in class Pointer
 o toString
 public String toString()
pointers convert to strings just as their values convert

Overrides:
toString in class Object
 o toDouble
 public double toDouble()
If a pointer to a numeric type, convert the .val field to a double, else just return 0.

Overrides:
toDouble in class Pointer
 o equalVal
 public boolean equalVal(Pointer obj)
Does this pointer and the other have the same value? Different types , such as (int)3 and (long)3 are defined to have different values.

Overrides:
equalVal in class Pointer

All Packages  Class Hierarchy  This Package  Previous  Next  Index