Record Class NaftahFunctionProvider

java.lang.Object
java.lang.Record
org.daiitech.naftah.builtin.lang.NaftahFunctionProvider
Record Components:
name - the provider's name
useQualifiedName - flags that the function names should be bound with the provider's name
useQualifiedAliases - flags that the function aliases should be bound with the provider's name
description - a brief description of the provider
functionNames - a list of function names provided
All Implemented Interfaces:
Serializable

public record NaftahFunctionProvider(String name, boolean useQualifiedName, boolean useQualifiedAliases, String description, List<String> functionNames) extends Record implements Serializable
Represents a provider of Naftah functions.

This record contains metadata about a function provider, including its name, a description, and the list of function names it offers.

Author:
Chakib Daii
See Also:
  • Field Details

    • name

      private final String name
      The field for the name record component.
    • useQualifiedName

      private final boolean useQualifiedName
      The field for the useQualifiedName record component.
    • useQualifiedAliases

      private final boolean useQualifiedAliases
      The field for the useQualifiedAliases record component.
    • description

      private final String description
      The field for the description record component.
    • functionNames

      private final List<String> functionNames
      The field for the functionNames record component.
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
  • Constructor Details

    • NaftahFunctionProvider

      public NaftahFunctionProvider(String name, boolean useQualifiedName, boolean useQualifiedAliases, String description, List<String> functionNames)
      Creates an instance of a NaftahFunctionProvider record class.
      Parameters:
      name - the value for the name record component
      useQualifiedName - the value for the useQualifiedName record component
      useQualifiedAliases - the value for the useQualifiedAliases record component
      description - the value for the description record component
      functionNames - the value for the functionNames record component
  • Method Details

    • of

      public static NaftahFunctionProvider of(String name, boolean useQualifiedName, boolean useQualifiedAliases, String description, String[] functionNames)
      Factory method to create a NaftahFunctionProvider instance.
      Parameters:
      name - the provider's name
      useQualifiedName - flags that the function names should be bound with the provider's name
      useQualifiedAliases - flags that the function aliases should be bound with the provider's name
      description - a brief description of the provider
      functionNames - an array of function names provided
      Returns:
      a new NaftahFunctionProvider instance
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • useQualifiedName

      public boolean useQualifiedName()
      Returns the value of the useQualifiedName record component.
      Returns:
      the value of the useQualifiedName record component
    • useQualifiedAliases

      public boolean useQualifiedAliases()
      Returns the value of the useQualifiedAliases record component.
      Returns:
      the value of the useQualifiedAliases record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • functionNames

      public List<String> functionNames()
      Returns the value of the functionNames record component.
      Returns:
      the value of the functionNames record component