Class ArrayShift

java.lang.Object
ortus.boxlang.runtime.bifs.BIF
ortus.boxlang.runtime.bifs.global.array.ArrayShift

@BoxBIF(description="Remove and return the first element from an array") @BoxMember(type=ARRAY) public class ArrayShift extends BIF
  • Constructor Details

    • ArrayShift

      public ArrayShift()
      Constructor
  • Method Details

    • _invoke

      public Object _invoke(IBoxContext context, ArgumentsScope arguments)
      Removes the first element from an array and returns the removed element. This method changes the length of the array. If used on an empty array, an exception will be thrown.
      Specified by:
      _invoke in class BIF
      Parameters:
      context - The context in which the BIF is being invoked.
      arguments - Argument scope for the BIF.
      Returns:
      The result of the invocation