Initial commit from SVN.
This commit is contained in:
35
Common/src/com/common/event/ObjectHandler2.java
Normal file
35
Common/src/com/common/event/ObjectHandler2.java
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 1999,2005 Declarative Engineering LLC.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Declarative Engineering LLC
|
||||
* verson 1 which accompanies this distribution, and is available at
|
||||
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||||
*/
|
||||
package com.common.event;
|
||||
|
||||
/**
|
||||
* Performs some task using the passed parameters and returns a value of Object type.
|
||||
*/
|
||||
public abstract class ObjectHandler2 extends ObjectHandler {
|
||||
/**
|
||||
* ObjectHandler2 constructor.
|
||||
*/
|
||||
public ObjectHandler2() {
|
||||
super();
|
||||
}//ObjectHandler2()//
|
||||
/**
|
||||
* Calls the evaluate method that takes two parameters.
|
||||
* @param parameters The parameters passed to the handler when it is invoked.
|
||||
* @return The object value that is the result of the task handling.
|
||||
*/
|
||||
public final Object evaluate(Object[] parameters) {
|
||||
return evaluate(((parameters != null) && (parameters.length > 0)) ? parameters[0] : null, ((parameters != null) && (parameters.length > 1)) ? parameters[1] : null);
|
||||
}//evaluate()//
|
||||
/**
|
||||
* Performs some action when the handler is invoked.
|
||||
* @param param1 The first parameter passed to the handler when it is invoked.
|
||||
* @param param2 The second parameter passed to the handler when it is invoked.
|
||||
* @return The object value that is the result of the task handling.
|
||||
*/
|
||||
public abstract Object evaluate(Object param1, Object param2);
|
||||
}//ObjectHandler2//
|
||||
Reference in New Issue
Block a user