gnu.trove
Class SerializationProcedure

java.lang.Object
  extended by gnu.trove.SerializationProcedure
All Implemented Interfaces:
TDoubleDoubleProcedure, TDoubleFloatProcedure, TDoubleIntProcedure, TDoubleLongProcedure, TDoubleObjectProcedure, TDoubleProcedure, TFloatDoubleProcedure, TFloatFloatProcedure, TFloatIntProcedure, TFloatLongProcedure, TFloatObjectProcedure, TFloatProcedure, TIntDoubleProcedure, TIntFloatProcedure, TIntIntProcedure, TIntLongProcedure, TIntObjectProcedure, TIntProcedure, TLongDoubleProcedure, TLongFloatProcedure, TLongIntProcedure, TLongLongProcedure, TLongObjectProcedure, TLongProcedure, TObjectDoubleProcedure, TObjectFloatProcedure, TObjectIntProcedure, TObjectLongProcedure, TObjectObjectProcedure, TObjectProcedure

 class SerializationProcedure
extends java.lang.Object
implements TDoubleDoubleProcedure, TDoubleFloatProcedure, TDoubleIntProcedure, TDoubleLongProcedure, TDoubleObjectProcedure, TDoubleProcedure, TFloatDoubleProcedure, TFloatFloatProcedure, TFloatIntProcedure, TFloatLongProcedure, TFloatObjectProcedure, TFloatProcedure, TIntDoubleProcedure, TIntFloatProcedure, TIntIntProcedure, TIntLongProcedure, TIntObjectProcedure, TIntProcedure, TLongDoubleProcedure, TLongFloatProcedure, TLongIntProcedure, TLongLongProcedure, TLongObjectProcedure, TLongProcedure, TObjectDoubleProcedure, TObjectFloatProcedure, TObjectIntProcedure, TObjectLongProcedure, TObjectObjectProcedure, TObjectProcedure

Implementation of the variously typed procedure interfaces that supports writing the arguments to the procedure out on an ObjectOutputStream. In the case of two-argument procedures, the arguments are written out in the order received.

Any IOException is trapped here so that it can be rethrown in a writeObject method.

Created: Sun Jul 7 00:14:18 2002

Version:
$Id: SerializationProcedure.java,v 1.3 2002/07/08 23:54:13 ericdf Exp $
Author:
Eric D. Friedman

Field Summary
(package private)  java.io.IOException exception
           
private  java.io.ObjectOutputStream stream
           
 
Constructor Summary
SerializationProcedure(java.io.ObjectOutputStream stream)
           
 
Method Summary
 boolean execute(double val)
          Executes this procedure.
 boolean execute(double key, double val)
          Executes this procedure.
 boolean execute(double key, float val)
          Executes this procedure.
 boolean execute(double key, int val)
          Executes this procedure.
 boolean execute(double key, long val)
          Executes this procedure.
 boolean execute(double key, java.lang.Object val)
          Executes this procedure.
 boolean execute(float val)
          Executes this procedure.
 boolean execute(float key, double val)
          Executes this procedure.
 boolean execute(float key, float val)
          Executes this procedure.
 boolean execute(float key, int val)
          Executes this procedure.
 boolean execute(float key, long val)
          Executes this procedure.
 boolean execute(float key, java.lang.Object val)
          Executes this procedure.
 boolean execute(int val)
          Executes this procedure.
 boolean execute(int key, double val)
          Executes this procedure.
 boolean execute(int key, float val)
          Executes this procedure.
 boolean execute(int key, int val)
          Executes this procedure.
 boolean execute(int key, long val)
          Executes this procedure.
 boolean execute(int key, java.lang.Object val)
          Executes this procedure.
 boolean execute(long val)
          Executes this procedure.
 boolean execute(long key, double val)
          Executes this procedure.
 boolean execute(long key, float val)
          Executes this procedure.
 boolean execute(long key, int val)
          Executes this procedure.
 boolean execute(long key, long val)
          Executes this procedure.
 boolean execute(long key, java.lang.Object val)
          Executes this procedure.
 boolean execute(java.lang.Object val)
          Executes this procedure.
 boolean execute(java.lang.Object key, double val)
          Executes this procedure.
 boolean execute(java.lang.Object key, float val)
          Executes this procedure.
 boolean execute(java.lang.Object key, int val)
          Executes this procedure.
 boolean execute(java.lang.Object key, long val)
          Executes this procedure.
 boolean execute(java.lang.Object key, java.lang.Object val)
          Executes this procedure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stream

private final java.io.ObjectOutputStream stream

exception

java.io.IOException exception
Constructor Detail

SerializationProcedure

SerializationProcedure(java.io.ObjectOutputStream stream)
Method Detail

execute

public boolean execute(int val)
Description copied from interface: TIntProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TIntProcedure
Parameters:
val - a value of type int
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(double val)
Description copied from interface: TDoubleProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TDoubleProcedure
Parameters:
val - a value of type double
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(long val)
Description copied from interface: TLongProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TLongProcedure
Parameters:
val - a value of type long
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(float val)
Description copied from interface: TFloatProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TFloatProcedure
Parameters:
val - a value of type float
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(java.lang.Object val)
Description copied from interface: TObjectProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TObjectProcedure
Parameters:
val - an Object value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(java.lang.Object key,
                       java.lang.Object val)
Description copied from interface: TObjectObjectProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TObjectObjectProcedure
Parameters:
key - an Object value
val - an Object value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(java.lang.Object key,
                       int val)
Description copied from interface: TObjectIntProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TObjectIntProcedure
Parameters:
key - an Object value
val - an int value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(java.lang.Object key,
                       long val)
Description copied from interface: TObjectLongProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TObjectLongProcedure
Parameters:
key - an Object value
val - an long value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(java.lang.Object key,
                       double val)
Description copied from interface: TObjectDoubleProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TObjectDoubleProcedure
Parameters:
key - an Object value
val - an double value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(java.lang.Object key,
                       float val)
Description copied from interface: TObjectFloatProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TObjectFloatProcedure
Parameters:
key - an Object value
val - an float value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(int key,
                       java.lang.Object val)
Description copied from interface: TIntObjectProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TIntObjectProcedure
Parameters:
key - an int value
val - an Object value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(int key,
                       int val)
Description copied from interface: TIntIntProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TIntIntProcedure
Parameters:
key - an int value
val - an int value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(int key,
                       long val)
Description copied from interface: TIntLongProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TIntLongProcedure
Parameters:
key - an int value
val - an long value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(int key,
                       double val)
Description copied from interface: TIntDoubleProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TIntDoubleProcedure
Parameters:
key - an int value
val - an double value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(int key,
                       float val)
Description copied from interface: TIntFloatProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TIntFloatProcedure
Parameters:
key - an int value
val - an float value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(long key,
                       java.lang.Object val)
Description copied from interface: TLongObjectProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TLongObjectProcedure
Parameters:
key - an long value
val - an Object value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(long key,
                       int val)
Description copied from interface: TLongIntProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TLongIntProcedure
Parameters:
key - an long value
val - an int value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(long key,
                       long val)
Description copied from interface: TLongLongProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TLongLongProcedure
Parameters:
key - an long value
val - an long value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(long key,
                       double val)
Description copied from interface: TLongDoubleProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TLongDoubleProcedure
Parameters:
key - an long value
val - an double value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(long key,
                       float val)
Description copied from interface: TLongFloatProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TLongFloatProcedure
Parameters:
key - an long value
val - an float value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(double key,
                       java.lang.Object val)
Description copied from interface: TDoubleObjectProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TDoubleObjectProcedure
Parameters:
key - an double value
val - an Object value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(double key,
                       int val)
Description copied from interface: TDoubleIntProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TDoubleIntProcedure
Parameters:
key - an double value
val - an int value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(double key,
                       long val)
Description copied from interface: TDoubleLongProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TDoubleLongProcedure
Parameters:
key - an double value
val - an long value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(double key,
                       double val)
Description copied from interface: TDoubleDoubleProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TDoubleDoubleProcedure
Parameters:
key - an double value
val - an double value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(double key,
                       float val)
Description copied from interface: TDoubleFloatProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TDoubleFloatProcedure
Parameters:
key - an double value
val - an float value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(float key,
                       java.lang.Object val)
Description copied from interface: TFloatObjectProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TFloatObjectProcedure
Parameters:
key - an float value
val - an Object value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(float key,
                       int val)
Description copied from interface: TFloatIntProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TFloatIntProcedure
Parameters:
key - an float value
val - an int value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(float key,
                       long val)
Description copied from interface: TFloatLongProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TFloatLongProcedure
Parameters:
key - an float value
val - an long value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(float key,
                       double val)
Description copied from interface: TFloatDoubleProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TFloatDoubleProcedure
Parameters:
key - an float value
val - an double value
Returns:
true if additional invocations of the procedure are allowed.

execute

public boolean execute(float key,
                       float val)
Description copied from interface: TFloatFloatProcedure
Executes this procedure. A false return value indicates that the application executing this procedure should not invoke this procedure again.

Specified by:
execute in interface TFloatFloatProcedure
Parameters:
key - an float value
val - an float value
Returns:
true if additional invocations of the procedure are allowed.