com.spss.psapi.runtime

Interface Operator.Builder

  • Enclosing interface:
    Operator


    public static interface Operator.Builder
    • Method Detail

      • setLabel

        Operator.Builder setLabel(java.lang.String label)
        Sets the label.
        Parameters:
        label - the human-readable label
        Returns:
        the builder
      • setDescription

        Operator.Builder setDescription(java.lang.String description)
        Sets the description.
        Parameters:
        description - the human-readable description
        Returns:
        the builder
      • setCategories

        Operator.Builder setCategories(java.util.List<java.lang.String> categories)
        Sets the categories.
        Parameters:
        categories - the categories this operator belongs to
        Returns:
        the builder
      • addParameter

        Operator.Builder addParameter(java.lang.String name,
                                    java.lang.String label,
                                    java.lang.String description,
                                    java.lang.String type,
                                    java.lang.String role,
                                    java.lang.Object defaultValue,
                                    boolean required,
                                    ValueConstraint valueConstraint)
        Adds a parameter definition to the builder. The basic parameter types may be one of:
        • string
        • boolean
        • integer
        • long
        • double
        • float
        • (Structure name)
        In addition, two "composite" types can be specified:
        • array[type]
        • map[key-type,value-type]
        Parameters:
        name - the parameter name
        label - the parameter label
        description - the parameter description or null
        type - the parameter type
        role - the (optional) role of the parameter or null
        defaultValue - the default value
        required - whether the parameter is required e.g. it cannot an empty string
        valueConstraint - the value constraint if relevant or null
        Returns:
        the builder
      • addParameterGroup

        Operator.Builder addParameterGroup(java.lang.String name,
                                         java.lang.String label,
                                         java.lang.String description,
                                         java.lang.String type,
                                         java.util.List<java.lang.String> parameters,
                                         java.lang.String parentGroup)
        Adds a parameter group that directly references parameters directly to the builder.
        Parameters:
        name - the group name which should be unique within an operator
        label - the group label
        description - the group description
        type - the group type or null
        parameters - the list of parameter names to be included in this group
        parentGroup - the name of the parent group or null for a primary group
        Returns:
        the builder
      • newEnumerationConstraint

        ValueConstraint newEnumerationConstraint(java.util.List<java.lang.String> values)
        Returns an enumeration constraint.
        Parameters:
        values - the valid values in the enumeration
        Returns:
        a value constraint
      • newRangeConstraint

        ValueConstraint newRangeConstraint(java.lang.Number lowerBound,
                                         java.lang.Number upperBound)
        Returns a numeric range constraint.
        Parameters:
        lowerBound - the lower bound or null if there is no lower bound
        upperBound - the upper bound or null if there is no upper bound
        Returns:
        a range constraint
      • newStructureConstraintBuilder

        ValueConstraint.StructureBuilder newStructureConstraintBuilder()
        Returns a builder that can be used create a structure constraint.
        Returns:
        a structure constraint builder
      • build

        Operator build()
        Creates an operator from this builder.
        Returns:
        an operator

(C) Copyright IBM Corp. 1994, 2015. All Rights Reserved.