Afaik interfaces give certain method signatures that must appear
identical in the class that implements it. This is good for having
hood organized code and multiple classes with sinmilar functionality.
You can also do other things like like type an object to an interface.
Sent from my iPhone
On Oct 10, 2008, at 6:19 AM, "flexaustin" <[EMAIL PROTECTED]> wrote:
I was wondering if someone can explain why you would need an interface
so short?
INTERFACE:
package my.package.area
{
/**
* Interface for methods that evaluate an object and return a result.
*/
public interface IEval
{
/**
* Evaluates the input object
* @o the object to evaluate
* @return the computed result value
*/
function eval(o:Object=null):*;
} // end of interface IEval
}
USAGE OF INTERFACE:
if (value is IEval) { value = IEval(value).eval(o) };
Cairngorm has a short interface like this as well, though I cannot
remember what it is. In Cairngorm they say its for naming or to make
the code easier to understand? I am just not sure why you would do
this? Help me see the light!
TIA