Class ImmutableInsightBeanFilter<T>

java.lang.Object
io.riada.insight.model.filter.InsightBeanFilter<T>
io.riada.insight.model.filter.ImmutableInsightBeanFilter<T>

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableInsightBeanFilter<T> extends InsightBeanFilter<T>
Immutable implementation of InsightBeanFilter.

Use the builder to create immutable instances: ImmutableInsightBeanFilter.builder().

  • Method Details

    • getPredicate

      public Predicate<T> getPredicate()
      Specified by:
      getPredicate in class InsightBeanFilter<T>
      Returns:
      The value of the predicate attribute
    • withPredicate

      public final ImmutableInsightBeanFilter<T> withPredicate(Predicate<T> value)
      Copy the current immutable object by setting a value for the predicate attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for predicate
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableInsightBeanFilter that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: predicate.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value InsightBeanFilter with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static <T> ImmutableInsightBeanFilter<T> copyOf(InsightBeanFilter<T> instance)
      Creates an immutable copy of a InsightBeanFilter value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Type Parameters:
      T - generic parameter T
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable InsightBeanFilter instance
    • builder

      public static <T> ImmutableInsightBeanFilter.Builder<T> builder()
      Creates a builder for ImmutableInsightBeanFilter.
       ImmutableInsightBeanFilter.&lt;T&gt;builder()
          .setPredicate(function.Predicate&lt;T&gt;) // required predicate
          .build();
       
      Type Parameters:
      T - generic parameter T
      Returns:
      A new ImmutableInsightBeanFilter builder