Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jaxen.function
Class LastFunction

    java.lang.Object
      org.jaxen.function.LastFunction

All Implemented Interfaces:
  Function

public class LastFunction
extends Object
implements Function

4.1 `number last()`

> The last function returns a number equal to the context size from the expression evaluation context.

Author:
  bob mcwhirter (bob @ werken.com)
See Also:
  Section 4.1 of the XPath Specification

Constructor Summary
`LastFunction()` Create a new `LastFunction` object.

Method Summary
`Object` | `call(Context context, List args)` Returns the number of nodes in the context node-set.
`static Double` | `evaluate(Context context)` Returns the number of nodes in the context node-set.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LastFunction

    public LastFunction()

  Create a new `LastFunction` object.

Method Detail

### call

    public Object call(Context context,
                       List args)
                throws FunctionCallException

  Returns the number of nodes in the context node-set.

  Specified by:
    `call` in interface `Function`
  Parameters:
    `context` - the context at the point in the expression where the function is called
    `args` - an empty list
  Returns:
    a `Double` containing the context size
  Throws:
    `FunctionCallException` - if `args` is not empty
  See Also:
    `Context.getSize()`

### evaluate

    public static Double evaluate(Context context)

  Returns the number of nodes in the context node-set.

  Parameters:
    `context` - the context at the point in the expression where the function is called
  Returns:
    the context size
  See Also:
    `Context.getSize()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 Codehaus. All Rights Reserved.