FunctionUtil

Kind of class:class
Inherits from:none
Version:02/11/07
Author:Aaron Clinger
Classpath:org.casalib.util.FunctionUtil
File last modified:Monday, 01 December 2008, 13:34:40

Summary


Class methods
  • hasMinArguments (args:Object, min:Number) : Boolean
    • Determines if object has minimum number of arguments.

Class methods

hasMinArguments

static function hasMinArguments (
args:Object, min:Number) : Boolean

Determines if object has minimum number of arguments.
Parameters:
arguments:
The argument object.
min :
The amount of arguments.
Returns:
  • Returns true if the objects length is equal to, or greater than the minimum amount of arguments; otherwise false.
Usage:
  • function myMethod(firstValue:String, secondValue:Number, optionalValue:Number):Void {
        if (!FunctionUtil.hasMinArguments(arguments, 2))
            return;
    
        trace("Has minimum arguments.");
    }