Class ListPath<E,Q extends SimpleExpression<? super E>>

Type Parameters:
E - component type
Q - result type for get(int) and any() results
All Implemented Interfaces:
CollectionExpression<List<E>,E>, ListExpression<E,Q>, Expression<List<E>>, ParameterizedExpression<List<E>>, Path<List<E>>, Serializable

public class ListPath<E,Q extends SimpleExpression<? super E>> extends CollectionPathBase<List<E>,E,Q> implements ListExpression<E,Q>
ListPath represents list paths
Author:
tiwe
See Also:
  • Constructor Details

  • Method Details

    • accept

      public final <R, C> R accept(Visitor<R,C> v, C context)
      Description copied from interface: Expression
      Accept the visitor with the given context
      Specified by:
      accept in interface Expression<E>
      Type Parameters:
      R - return type
      C - context type
      Parameters:
      v - visitor
      context - context of visit
      Returns:
      result of visit
    • any

      public Q any()
      Description copied from class: CollectionPathBase
      Create a path that matches any element in this collection
      Specified by:
      any in class CollectionPathBase<List<E>,E,Q extends SimpleExpression<? super E>>
      Returns:
      path expression
    • forListAccess

      protected PathMetadata forListAccess(int index)
    • forListAccess

      protected PathMetadata forListAccess(Expression<Integer> index)
    • get

      public Q get(Expression<Integer> index)
      Description copied from interface: ListExpression
      Indexed access, gets the element at the given index
      Specified by:
      get in interface ListExpression<E,Q extends SimpleExpression<? super E>>
      Parameters:
      index - zero based index
      Returns:
      this.get(index)
      See Also:
    • get

      public Q get(int index)
      Description copied from interface: ListExpression
      Indexed access, gets the element at the given index
      Specified by:
      get in interface ListExpression<E,Q extends SimpleExpression<? super E>>
      Parameters:
      index - zero based index
      Returns:
      this.get(index)
      See Also:
    • getElementType

      public Class<E> getElementType()
      Description copied from class: CollectionExpressionBase
      Get the element type
      Specified by:
      getElementType in class CollectionExpressionBase<List<E>,E>
      Returns:
      element type
    • getMetadata

      public PathMetadata getMetadata()
      Description copied from interface: Path
      Get the metadata for this path
      Specified by:
      getMetadata in interface Path<E>
      Returns:
      path metadata
    • getRoot

      public Path<?> getRoot()
      Description copied from interface: Path
      Get the root for this path
      Specified by:
      getRoot in interface Path<E>
      Returns:
      root of path
    • getAnnotatedElement

      public AnnotatedElement getAnnotatedElement()
      Description copied from interface: Path
      Return the annotated element related to the given path

      For property paths the annotated element contains the annotations of the related field and/or getter method and for all others paths the annotated element is the expression type.

      Specified by:
      getAnnotatedElement in interface Path<E>
      Returns:
      annotated element
    • getParameter

      public Class<?> getParameter(int index)
      Description copied from interface: ParameterizedExpression
      Get the type parameter at the given index
      Specified by:
      getParameter in interface ParameterizedExpression<E>
      Parameters:
      index - zero based index of type parameter
      Returns:
      type parameter at index