Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for LongAdder (0.17 sec)

  1. android/guava/src/com/google/common/cache/LongAdder.java

    @ElementTypesAreNonnullByDefault
    final class LongAdder extends Striped64 implements Serializable, LongAddable {
      private static final long serialVersionUID = 7249069246863182397L;
    
      /** Version of plus for use in retryUpdate */
      @Override
      final long fn(long v, long x) {
        return v + x;
      }
    
      /** Creates a new adder with initial sum of zero. */
      public LongAdder() {}
    
      /**
       * Adds the given value.
       *
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 5.5K bytes
    - Viewed (0)
  2. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LongAdder.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.cache;
    
    /**
     * GWT emulated version of LongAdder.
     *
     * @author Charles Fry
     */
    class LongAdder implements LongAddable {
    
      private long value;
    
      public void increment() {
        value++;
      }
    
      public void add(long x) {
        value += x;
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 914 bytes
    - Viewed (0)
  3. guava/src/com/google/common/cache/LongAdder.java

    @ElementTypesAreNonnullByDefault
    final class LongAdder extends Striped64 implements Serializable, LongAddable {
      private static final long serialVersionUID = 7249069246863182397L;
    
      /** Version of plus for use in retryUpdate */
      @Override
      final long fn(long v, long x) {
        return v + x;
      }
    
      /** Creates a new adder with initial sum of zero. */
      public LongAdder() {}
    
      /**
       * Adds the given value.
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 5.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/LongAdder.java

     */
    @ElementTypesAreNonnullByDefault
    final class LongAdder extends Striped64 implements Serializable, LongAddable {
      private static final long serialVersionUID = 7249069246863182397L;
    
      /** Version of plus for use in retryUpdate */
      @Override
      final long fn(long v, long x) {
        return v + x;
      }
    
      /** Creates a new adder with initial sum of zero. */
      public LongAdder() {}
    
      /**
       * Adds the given value.
       *
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/LongAdderTest.java

       */
      public void testNulls() {}
    
      public void testOverflows() {
        LongAdder longAdder = new LongAdder();
        longAdder.add(Long.MAX_VALUE);
        assertThat(longAdder.sum()).isEqualTo(Long.MAX_VALUE);
        longAdder.add(1);
        // silently overflows; is this a bug?
        // See https://github.com/google/guava/issues/3503
        assertThat(longAdder.sum()).isEqualTo(-9223372036854775808L);
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jul 09 04:11:29 GMT 2019
    - 1.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/LongAdderTest.java

       */
      public void testNulls() {}
    
      public void testOverflows() {
        LongAdder longAdder = new LongAdder();
        longAdder.add(Long.MAX_VALUE);
        assertThat(longAdder.sum()).isEqualTo(Long.MAX_VALUE);
        longAdder.add(1);
        // silently overflows; is this a bug?
        // See https://github.com/google/guava/issues/3503
        assertThat(longAdder.sum()).isEqualTo(-9223372036854775808L);
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jul 09 04:11:29 GMT 2019
    - 1.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/cache/LongAddables.java

      static {
        Supplier<LongAddable> supplier;
        try {
          // trigger static initialization of the LongAdder class, which may fail
          LongAdder unused = new LongAdder();
          supplier =
              new Supplier<LongAddable>() {
                @Override
                public LongAddable get() {
                  return new LongAdder();
                }
              };
        } catch (Throwable t) { // we really want to catch *everything*
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 04 17:27:14 GMT 2022
    - 2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/LongAddables.java

      static {
        Supplier<LongAddable> supplier;
        try {
          // trigger static initialization of the LongAdder class, which may fail
          LongAdder unused = new LongAdder();
          supplier =
              new Supplier<LongAddable>() {
                @Override
                public LongAddable get() {
                  return new LongAdder();
                }
              };
        } catch (Throwable t) { // we really want to catch *everything*
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 04 17:27:14 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/cache/LongAddables.java

      static {
        Supplier<LongAddable> supplier;
        try {
          // trigger static initialization of the LongAdder class, which may fail
          LongAdder unused = new LongAdder();
          supplier =
              new Supplier<LongAddable>() {
                @Override
                public LongAddable get() {
                  return new LongAdder();
                }
              };
        } catch (Throwable t) { // we really want to catch *everything*
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jan 04 17:27:14 GMT 2022
    - 2K bytes
    - Viewed (0)
  10. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LongAddables.java

     */
    
    package com.google.common.cache;
    
    /**
     * GWT emulation for LongAddables.
     *
     * @author Louis Wasserman
     */
    final class LongAddables {
      public static LongAddable create() {
        return new LongAdder();
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Jun 23 13:24:59 GMT 2016
    - 809 bytes
    - Viewed (0)
Back to top