L - the type parameterR - the type parameterpublic class AtomicPair<L,R> extends Pair<L,R>
| Modifier | Constructor and Description |
|---|---|
protected |
AtomicPair(L left,
R right)
Instantiates a new Atomic pair.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareAndSet(L expectLeft,
R expectRight,
L newLeft,
R newRight)
Compare and set.
|
boolean |
compareLeftAndSet(L expectLeft,
L newLeft)
Compare left and set.
|
boolean |
compareLeftAndSet(L expectLeft,
L newLeft,
R newRight)
Compare left and set.
|
boolean |
compareRightAndSet(R expectRight,
L newLeft,
R newRight)
Compare right and set.
|
boolean |
compareRightAndSet(R expectRight,
R newRight)
Compare right and set.
|
static <L,R> AtomicPair<L,R> |
copyOf(Map.Entry<L,R> source)
Copy of.
|
boolean |
equals(Object obj) |
Pair<L,R> |
get()
Get pair.
|
L |
getAndSetLeft(L lt)
Gets and set left.
|
R |
getAndSetRight(R rt)
Gets and set right.
|
L |
getLeft()
Gets left.
|
R |
getRight()
Gets right.
|
int |
hashCode()
Generates hash code conforming with
Map.Entry.hashCode() specification. |
static <L,R> AtomicPair<L,R> |
of(L left,
R right)
Of atomic pair.
|
void |
set(L lt,
R rt)
Set void.
|
L |
setKey(L key)
Sets key.
|
void |
setLeft(L left)
Sets left.
|
void |
setRight(R right)
Sets right.
|
R |
setValue(R value) |
getKey, getValue, immutable, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparingByKey, comparingByKey, comparingByValue, comparingByValuepublic static <L,R> AtomicPair<L,R> of(L left, R right)
L - the type parameterR - the type parameterleft - the leftright - the rightpublic static <L,R> AtomicPair<L,R> copyOf(Map.Entry<L,R> source)
L - the type parameterR - the type parametersource - the sourcepublic void setLeft(L left)
left - the leftpublic void setRight(R right)
right - the rightpublic L getAndSetLeft(L lt)
lt - the ltpublic R getAndSetRight(R rt)
rt - the rtpublic boolean compareAndSet(L expectLeft, R expectRight, L newLeft, R newRight)
expectLeft - the expect leftexpectRight - the expect rightnewLeft - the new leftnewRight - the new rightpublic boolean compareLeftAndSet(L expectLeft, L newLeft)
expectLeft - the expect leftnewLeft - the new leftpublic boolean compareLeftAndSet(L expectLeft, L newLeft, R newRight)
expectLeft - the expect leftnewLeft - the new leftnewRight - the new rightpublic boolean compareRightAndSet(R expectRight, R newRight)
expectRight - the expect rightnewRight - the new rightpublic boolean compareRightAndSet(R expectRight, L newLeft, R newRight)
expectRight - the expect rightnewLeft - the new leftnewRight - the new rightpublic int hashCode()
PairMap.Entry.hashCode() specification.Copyright © 2014 Boleslav Bobcik - Auderis. All rights reserved.