-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sm-airlift-up
- Loading branch information
Showing
396 changed files
with
2,916 additions
and
2,146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
Util/src/main/java/io/deephaven/util/mutable/MutableInt.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// | ||
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending | ||
// | ||
package io.deephaven.util.mutable; | ||
|
||
/** | ||
* Minimal mutable wrapper for an {@code int} value. Loosely based on | ||
* {@code org.apache.commons.lang3.mutable.MutableInt}, but without inheriting from {@link Number}, or providing any | ||
* overloads that accept {@code Number} or any boxed types. | ||
* <p> | ||
* Deliberately does not extend {@code Number}, does not implement {@code toString()}/{@code equals}/{@code hashcode()}, | ||
* or implement {@code Comparable}. | ||
*/ | ||
|
||
public class MutableInt { | ||
private int value; | ||
|
||
public MutableInt() { | ||
|
||
} | ||
|
||
public MutableInt(final int value) { | ||
this.value = value; | ||
} | ||
|
||
public int get() { | ||
return value; | ||
} | ||
|
||
public void set(int value) { | ||
this.value = value; | ||
} | ||
|
||
public void add(int addend) { | ||
this.value += addend; | ||
} | ||
|
||
public int addAndGet(int addend) { | ||
value += addend; | ||
return value; | ||
} | ||
|
||
public int getAndAdd(int addend) { | ||
int old = value; | ||
value += addend; | ||
return old; | ||
} | ||
|
||
public int getAndIncrement() { | ||
return value++; | ||
} | ||
|
||
public void increment() { | ||
value++; | ||
} | ||
|
||
public void decrement() { | ||
value--; | ||
} | ||
|
||
public int incrementAndGet() { | ||
return ++value; | ||
} | ||
|
||
public void subtract(final int subtrahend) { | ||
this.value -= subtrahend; | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
Util/src/main/java/io/deephaven/util/mutable/MutableLong.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// | ||
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending | ||
// | ||
package io.deephaven.util.mutable; | ||
|
||
/** | ||
* Minimal mutable wrapper for a {@code long} value. Loosely based on | ||
* {@code org.apache.commons.lang3.mutable.MutableLong}, but without inheriting from {@link Number}, or providing any | ||
* overloads that accept {@code Number} or any boxed types. | ||
* <p> | ||
* Deliberately does not extend {@code Number}, does not implement {@code toString()}/{@code equals}/{@code hashcode()}, | ||
* or implement {@code Comparable}. | ||
*/ | ||
public class MutableLong { | ||
private long value; | ||
|
||
public MutableLong() { | ||
|
||
} | ||
|
||
public MutableLong(final long value) { | ||
this.value = value; | ||
} | ||
|
||
public long get() { | ||
return value; | ||
} | ||
|
||
public void set(long value) { | ||
this.value = value; | ||
} | ||
|
||
public void add(long addend) { | ||
this.value += addend; | ||
} | ||
|
||
public long addAndGet(long addend) { | ||
value += addend; | ||
return value; | ||
} | ||
|
||
public long getAndAdd(long addend) { | ||
long old = value; | ||
value += addend; | ||
return old; | ||
} | ||
|
||
public long getAndIncrement() { | ||
return value++; | ||
} | ||
|
||
public void increment() { | ||
value++; | ||
} | ||
|
||
public void decrement() { | ||
value--; | ||
} | ||
|
||
public long incrementAndGet() { | ||
return ++value; | ||
} | ||
|
||
public void subtract(final long subtrahend) { | ||
this.value -= subtrahend; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.