java.lang.Object
dev.langchain4j.store.embedding.filter.comparison.ContainsString
All Implemented Interfaces:
Filter

public class ContainsString extends Object implements Filter
A filter that checks if the value of a metadata key contains a specific string. The value of the metadata key must be a string.
  • Constructor Details

    • ContainsString

      public ContainsString(String key, String comparisonValue)
  • Method Details

    • key

      public String key()
    • comparisonValue

      public String comparisonValue()
    • test

      public boolean test(Object object)
      Description copied from interface: Filter
      Tests if a given object satisfies this Filter.
      Specified by:
      test in interface Filter
      Parameters:
      object - An object to test.
      Returns:
      true if a given object satisfies this Filter, false otherwise.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object