Class IArgument.Builder

java.lang.Object
dev.metaschema.core.metapath.function.IArgument.Builder
Enclosing interface:
IArgument

public static final class IArgument.Builder extends Object
Used to create an argument's signature using a builder pattern.
  • Method Details

    • name

      @NonNull public IArgument.Builder name(@NonNull String name)
      Define the name of the function argument.
      Parameters:
      name - the argument's name
      Returns:
      this builder
    • type

      @NonNull public IArgument.Builder type(@NonNull IEnhancedQName name)
      Define the type of the function argument.

      By default an argument has the type IItem.

      Parameters:
      name - the qualified name of the argument's type
      Returns:
      this builder
    • type

      @NonNull public IArgument.Builder type(@NonNull IItemType type)
      Define the type of the function argument.

      By default an argument has the type IItem.

      Parameters:
      type - the argument's type
      Returns:
      this builder
    • zeroOrOne

      @NonNull public IArgument.Builder zeroOrOne()
      Identifies the argument's cardinality as a single, optional item (zero or one).
      Returns:
      this builder
    • one

      @NonNull public IArgument.Builder one()
      Identifies the argument's cardinality as a single, required item (one).
      Returns:
      this builder
    • zeroOrMore

      @NonNull public IArgument.Builder zeroOrMore()
      Identifies the argument's cardinality as an optional series of items (zero or more).
      Returns:
      this builder
    • oneOrMore

      @NonNull public IArgument.Builder oneOrMore()
      Identifies the argument's cardinality as a required series of items (one or more).
      Returns:
      this builder
    • build

      @NonNull public IArgument build()
      Builds the argument's signature.
      Returns:
      the argument's signature