Interface Keys


@Internal public interface Keys
A reusable key set for known object keys.
Since:
3.1
Author:
Denis Stepanov
  • Field Details

  • Method Details

    • create

      static Keys create(List<String> keys)
      Create a key set for the supplied keys.
      Parameters:
      keys - The keys
      Returns:
      The key set
    • create

      static Keys create(List<String> keys, boolean caseInsensitive)
      Create a key set for the supplied keys.
      Parameters:
      keys - The keys
      caseInsensitive - Whether key matching should be case-insensitive
      Returns:
      The key set
    • create

      static Keys create(String... keys)
      Create a key set for the supplied keys.
      Parameters:
      keys - The keys
      Returns:
      The key set
    • create

      static Keys create(String[] keys, boolean caseInsensitive)
      Create a key set for the supplied keys.
      Parameters:
      keys - The keys
      caseInsensitive - Whether key matching should be case-insensitive
      Returns:
      The key set
    • createWithMetadata

      static Keys createWithMetadata(List<KeyDescriptor> keys)
      Create a key set with metadata available to backend-specific key providers.
      Parameters:
      keys - The key descriptors
      Returns:
      The key set
      Since:
      3.2
    • createWithMetadata

      static Keys createWithMetadata(List<KeyDescriptor> keys, boolean caseInsensitive)
      Create a key set with metadata available to backend-specific key providers.
      Parameters:
      keys - The key descriptors
      caseInsensitive - Whether key matching should be case-insensitive
      Returns:
      The key set
      Since:
      3.2
    • createWithMetadata

      static Keys createWithMetadata(KeyDescriptor... keys)
      Create a key set with metadata available to backend-specific key providers.
      Parameters:
      keys - The key descriptors
      Returns:
      The key set
      Since:
      3.2
    • createWithMetadata

      static Keys createWithMetadata(KeyDescriptor[] keys, boolean caseInsensitive)
      Create a key set with metadata available to backend-specific key providers.
      Parameters:
      keys - The key descriptors
      caseInsensitive - Whether key matching should be case-insensitive
      Returns:
      The key set
      Since:
      3.2
    • indexOf

      int indexOf(String key)
      Find the index of the supplied key.
      Parameters:
      key - The key
      Returns:
      The key index, or UNKNOWN_KEY if no key matches
    • caseInsensitive

      default boolean caseInsensitive()
      Whether key matching should be case-insensitive.
      Returns:
      True if key matching should ignore case