Class Components<TYPE>

java.lang.Object
com.yahoo.vespa.indexinglanguage.expressions.Components<TYPE>
Direct Known Subclasses:
Components.Ignored, Components.Map

public abstract class Components<TYPE> extends Object
A collection of components of a given type, of which one will be selected by the appropriate ranking expression.
Author:
bratseth
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A components instance for environments where no components are available: This will claim to have any component, but will only return a failing instance.
    static class 
    A component instance backed by a map.
    static class 
    Selected component of a specific type.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract boolean
    contains(String componentId)
    Returns whether this contains the given id.
    Returns a component instance which will fail with the given message if used.
    abstract TYPE
    get(String componentId)
    Returns the component with this id, or null if it does not exist.
    abstract Set<String>
    ids()
    Returns all the known instance id's in this.
    abstract boolean
    Returns whether this is empty.
    abstract Optional<TYPE>
    Returns the single component selected by this without supplying an id, or empty if an id is required.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • ids

      public abstract Set<String> ids()
      Returns all the known instance id's in this.
    • isEmpty

      public abstract boolean isEmpty()
      Returns whether this is empty.
    • singleSelected

      public abstract Optional<TYPE> singleSelected()
      Returns the single component selected by this without supplying an id, or empty if an id is required.
    • contains

      public abstract boolean contains(String componentId)
      Returns whether this contains the given id.
    • get

      public abstract TYPE get(String componentId)
      Returns the component with this id, or null if it does not exist.
    • failingComponent

      public TYPE failingComponent(String message)
      Returns a component instance which will fail with the given message if used.