Package net.sf.saxon.expr

## Class ListCastableFunction

- java.lang.Object
- - net.sf.saxon.functions.AbstractFunction
  - - net.sf.saxon.expr.ListConstructorFunction
    - - net.sf.saxon.expr.ListCastableFunction

- All Implemented Interfaces:
    `Callable`, `Function`, `GroundedValue`, `Item`, `Sequence`

      public class ListCastableFunction
      extends ListConstructorFunction

  A function item representing a castability test for a list type

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.expr.ListConstructorFunction

      `allowEmpty, memberType, nsResolver, targetType`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ListCastableFunction​(ListType targetType, NamespaceResolver resolver, boolean allowEmpty)` | Create the constructor function.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `BooleanValue` | `call​(XPathContext context, Sequence[] args)` | Invoke the function
    `FunctionItemType` | `getFunctionItemType()` | Get the item type of the function item
    `StructuredQName` | `getFunctionName()` | Get the name of the function, or null if it is anonymous

    - ### Methods inherited from class net.sf.saxon.expr.ListConstructorFunction

      `getArity, getDescription, getMemberType, getTargetType, isAllowEmpty`

    - ### Methods inherited from class net.sf.saxon.functions.AbstractFunction

      `atomize, deepEquals, effectiveBooleanValue, export, getAnnotations, getOperandRoles, getStringValue, getStringValueCS, isArray, isMap, isTrustedResultType, makeNewContext, simplify, typeCheck`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.om.Function

      `getGenre, toShortString`

    - ### Methods inherited from interface net.sf.saxon.om.GroundedValue

      `asIterable, concatenate, containsNode, materialize`

    - ### Methods inherited from interface net.sf.saxon.om.Item

      `getLength, head, isStreamed, itemAt, iterate, reduce, subsequence`

    - ### Methods inherited from interface net.sf.saxon.om.Sequence

      `makeRepeatable`

- - ### Constructor Detail

    - #### ListCastableFunction

          public ListCastableFunction​(ListType targetType,
                                      NamespaceResolver resolver,
                                      boolean allowEmpty)
                               throws MissingComponentException

      Create the constructor function.
      Parameters:
        `targetType` - the type to which the function will convert its input
        `resolver` - namespace resolver for use if the target type is namespace-sensitive
      Throws:
        `MissingComponentException`

  - ### Method Detail

    - #### getFunctionItemType

          public FunctionItemType getFunctionItemType()

      Get the item type of the function item
      Specified by:
        `getFunctionItemType` in interface `Function`
      Overrides:
        `getFunctionItemType` in class `ListConstructorFunction`
      Returns:
        the function item's type

    - #### getFunctionName

          public StructuredQName getFunctionName()

      Get the name of the function, or null if it is anonymous
      Specified by:
        `getFunctionName` in interface `Function`
      Overrides:
        `getFunctionName` in class `ListConstructorFunction`
      Returns:
        the function name, or null for an anonymous inline function

    - #### call

          public BooleanValue call​(XPathContext context,
                                   Sequence[] args)
                            throws XPathException

      Invoke the function
      Specified by:
        `call` in interface `Callable`
      Specified by:
        `call` in interface `Function`
      Overrides:
        `call` in class `ListConstructorFunction`
      Parameters:
        `context` - the XPath dynamic evaluation context
        `args` - the actual arguments to be supplied
      Returns:
        the result of invoking the function
      Throws:
        `XPathException` - if a dynamic error occurs within the function