Module tvbrowser
Package util.misc

Class BooleanResult


  • public class BooleanResult
    extends java.lang.Object
    A class with multiple boolean values.
    Since:
    4.2.2
    Author:
    René Mach
    • Constructor Summary

      Constructors 
      Constructor Description
      BooleanResult​(boolean... values)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getResultCount()
      Gets the number of the results contained by this BooleanResult.
      boolean getResultForIndex​(java.lang.Integer index)
      Gets the boolean value for the result with the given index.
      boolean getResultForName​(java.lang.String name)
      Gets the boolean value for the result with the given name.
      boolean[] getResults()
      Gets an array with the result values.
      boolean isAllFalse()
      Gets if all boolean results contained are false
      boolean isAllTrue()
      Gets if all boolean results contained are true
      boolean isPartlyTrue()
      Gets if at least one boolean results contained is true
      void setResultNames​(java.lang.String... names)
      Sets the names for the result values, so it later can be used to acquire the result value for the name.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BooleanResult

        public BooleanResult​(boolean... values)
        Parameters:
        values - The boolean values for this result
    • Method Detail

      • setResultNames

        public void setResultNames​(java.lang.String... names)
        Sets the names for the result values, so it later can be used to acquire the result value for the name.
        Parameters:
        names - The names to set.
      • getResultCount

        public int getResultCount()
        Gets the number of the results contained by this BooleanResult.
        Returns:
        The number of the available results.
      • getResults

        public boolean[] getResults()
        Gets an array with the result values.
        Returns:
        The array with the result values.
      • getResultForIndex

        public boolean getResultForIndex​(java.lang.Integer index)
        Gets the boolean value for the result with the given index.
        Parameters:
        index - The index to get the boolean value for.
        Returns:
        true if the index exists and the result value is true, false otherwise.
      • getResultForName

        public boolean getResultForName​(java.lang.String name)
        Gets the boolean value for the result with the given name.
        Parameters:
        name - The name of the boolean value to get.
        Returns:
        true if the name exists and the result value is true, false otherwise.
      • isAllTrue

        public boolean isAllTrue()
        Gets if all boolean results contained are true
        Returns:
        true if all values contained are true, false otherwise.
      • isAllFalse

        public boolean isAllFalse()
        Gets if all boolean results contained are false
        Returns:
        true if all values contained are false, false otherwise.
      • isPartlyTrue

        public boolean isPartlyTrue()
        Gets if at least one boolean results contained is true
        Returns:
        true if at least one value contained is true, false otherwise.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object