Module lettuce.core

Class Parameters<P extends Parameter>

java.lang.Object
io.lettuce.core.dynamic.parameter.Parameters<P>
All Implemented Interfaces:
Iterable<P>
Direct Known Subclasses:
ExecutionSpecificParameters

public abstract class Parameters<P extends Parameter>
extends Object
implements Iterable<P>
Base class to abstract method Parameters.
Author:
Mark Paluch
  • Constructor Details

    • Parameters

      public Parameters​(Method method)
      Create new Parameters given a Method.
      Parameters:
      method - must not be null.
  • Method Details

    • createParameter

      protected abstract P createParameter​(Method method, int parameterIndex)
      Create a new Parameters for given a Method at parameterIndex.
      Parameters:
      method - must not be null.
      parameterIndex - the parameter index.
      Returns:
      the Parameter.
    • getParameters

      public List<P> getParameters()
      Returns:
    • getBindableParameter

      public Parameter getBindableParameter​(int index)
      Get the bindable parameter according it's logical position in the command. Declarative position may differ because of special parameters interleaved.
      Parameters:
      index -
      Returns:
      the Parameter.
    • getBindableParameters

      public List<P> getBindableParameters()
      Returns Parameter instances with effectively all special parameters removed.
      Returns:
    • iterator

      public Iterator<P> iterator()
      Specified by:
      iterator in interface Iterable<P extends Parameter>