Interface WithValue<T>


  • public interface WithValue<T>
    This object has some value and can give it. In common situation it's a String but it may be any other Object. And this object has special method hasValue(T) to check corresponding with this value and candidate value with special logic if at least one of these objects is String.
    • Method Detail

      • getValue

        @Nullable
        T getValue()
        This object has some value and can give it. In common situation it's a String but it may be any other Object. And this object has special method hasValue(T) to check corresponding with this value and candidate value with special logic if at least one of these objects is String.
        Returns:
        Objects value.
      • hasValue

        default boolean hasValue​(@Nullable
                                 T candidateValue)
        Smart check value if equals to getValue(). For string use StringUtils.equalsAnyIgnoreCase(java.lang.CharSequence, java.lang.CharSequence...)
        Parameters:
        candidateValue - Candidate object or String
        Returns:
        true - candidateValue corresponds to getValue().