Interface TruthValue<T>

All Superinterfaces:
Comparable<TruthValue<T>>

public interface TruthValue<T> extends Comparable<TruthValue<T>>
Represents a truth value in a logical system.

In classical logic, this is just True or False. In fuzzy logic, this is a value between 0 and 1.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Summary

    Modifier and Type
    Method
    Description
    and(TruthValue<T> other)
    Returns the conjunction of this truth value and another.
    Returns the underlying value.
    boolean
    Checks if this value represents absolute falsity (contradiction).
    boolean
    Checks if this value represents absolute truth (tautology).
    not()
    Returns the negation of this truth value.
    or(TruthValue<T> other)
    Returns the disjunction of this truth value and another.

    Methods inherited from interface Comparable

    compareTo
  • Method Details

    • getValue

      T getValue()
      Returns the underlying value.
      Returns:
      the value
    • not

      TruthValue<T> not()
      Returns the negation of this truth value.
      Returns:
      NOT this
    • and

      TruthValue<T> and(TruthValue<T> other)
      Returns the conjunction of this truth value and another.
      Parameters:
      other - the other truth value
      Returns:
      this AND other
    • or

      TruthValue<T> or(TruthValue<T> other)
      Returns the disjunction of this truth value and another.
      Parameters:
      other - the other truth value
      Returns:
      this OR other
    • isTrue

      boolean isTrue()
      Checks if this value represents absolute truth (tautology).
      Returns:
      true if this is the "True" value
    • isFalse

      boolean isFalse()
      Checks if this value represents absolute falsity (contradiction).
      Returns:
      true if this is the "False" value