Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for countTrue (0.11 sec)

  1. guava-tests/test/com/google/common/primitives/BooleansTest.java

      }
    
      public void testCountTrue() {
        assertThat(Booleans.countTrue()).isEqualTo(0);
        assertThat(Booleans.countTrue(false)).isEqualTo(0);
        assertThat(Booleans.countTrue(true)).isEqualTo(1);
        assertThat(Booleans.countTrue(false, true, false, true, false, true)).isEqualTo(3);
        assertThat(Booleans.countTrue(false, false, true, false, false)).isEqualTo(1);
      }
    
      @J2ktIncompatible
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 24.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/primitives/Booleans.java

        }
    
        private static final long serialVersionUID = 0;
      }
    
      /**
       * Returns the number of {@code values} that are {@code true}.
       *
       * @since 16.0
       */
      public static int countTrue(boolean... values) {
        int count = 0;
        for (boolean value : values) {
          if (value) {
            count++;
          }
        }
        return count;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/primitives/Booleans.java

        }
    
        private static final long serialVersionUID = 0;
      }
    
      /**
       * Returns the number of {@code values} that are {@code true}.
       *
       * @since 16.0
       */
      public static int countTrue(boolean... values) {
        int count = 0;
        for (boolean value : values) {
          if (value) {
            count++;
          }
        }
        return count;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 20.4K bytes
    - Viewed (0)
Back to top