summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/funcutils/LambdaLock.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/src/main/java/bjc/utils/funcutils/LambdaLock.java')
-rw-r--r--base/src/main/java/bjc/utils/funcutils/LambdaLock.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/base/src/main/java/bjc/utils/funcutils/LambdaLock.java b/base/src/main/java/bjc/utils/funcutils/LambdaLock.java
index 2506d53..0130a77 100644
--- a/base/src/main/java/bjc/utils/funcutils/LambdaLock.java
+++ b/base/src/main/java/bjc/utils/funcutils/LambdaLock.java
@@ -26,7 +26,7 @@ public class LambdaLock {
* Create a new lambda-enabled lock.
*
* @param lck
- * The lock to wrap.
+ * The lock to wrap.
*/
public LambdaLock(final ReadWriteLock lck) {
readLock = lck.readLock();
@@ -37,10 +37,9 @@ public class LambdaLock {
* Execute an action with the read lock taken.
*
* @param supp
- * The action to call.
+ * The action to call.
*
- * @return
- * The result of the action.
+ * @return The result of the action.
*/
public <T> T read(final Supplier<T> supp) {
readLock.lock();
@@ -56,10 +55,9 @@ public class LambdaLock {
* Execute an action with the write lock taken.
*
* @param supp
- * The action to call.
+ * The action to call.
*
- * @return
- * The result of the action.
+ * @return The result of the action.
*/
public <T> T write(final Supplier<T> supp) {
writeLock.lock();
@@ -75,7 +73,7 @@ public class LambdaLock {
* Execute an action with the read lock taken.
*
* @param action
- * The action to call.
+ * The action to call.
*/
public void read(final Runnable action) {
readLock.lock();
@@ -91,7 +89,7 @@ public class LambdaLock {
* Execute an action with the write lock taken.
*
* @param action
- * The action to call.
+ * The action to call.
*/
public void write(final Runnable action) {
writeLock.lock();