aa
com.cliffc.aa.util.NonBlockingHashMap< TypeK, TypeV >.NBHMEntry Class Reference
Inheritance diagram for com.cliffc.aa.util.NonBlockingHashMap< TypeK, TypeV >.NBHMEntry:
[legend]
Collaboration diagram for com.cliffc.aa.util.NonBlockingHashMap< TypeK, TypeV >.NBHMEntry:
[legend]

Public Member Functions

boolean equals (final Object o)
 Equal if the underlying key & value are equal. More...
 
TypeK getKey ()
 Return key. More...
 
TypeV getValue ()
 Return val. More...
 
int hashCode ()
 Compute "key.hashCode() ^ val.hashCode()" More...
 
TypeV setValue (final TypeV val)
 
String toString ()
 Return "key=val" string. More...
 

Protected Attributes

final TypeK _key
 Strongly typed key. More...
 
TypeV _val
 Strongly typed value. More...
 

Package Functions

 NBHMEntry (final TypeK k, final TypeV v)
 

Static Private Member Functions

static boolean eq (final Object o1, final Object o2)
 

Detailed Description

Definition at line 1318 of file NonBlockingHashMap.java.

Constructor & Destructor Documentation

◆ NBHMEntry()

com.cliffc.aa.util.NonBlockingHashMap< TypeK, TypeV >.NBHMEntry.NBHMEntry ( final TypeK  k,
final TypeV  v 
)
package

Definition at line 1319 of file NonBlockingHashMap.java.

1319 { super(k,v); }

Member Function Documentation

◆ eq()

static boolean com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >.eq ( final Object  o1,
final Object  o2 
)
staticprivateinherited

Definition at line 44 of file AbstractEntry.java.

44  {
45  return (o1 == null ? o2 == null : o1.equals(o2));
46  }

Referenced by com.cliffc.aa.util.AbstractEntry< Long, TypeV >.equals().

Here is the caller graph for this function:

◆ equals()

boolean com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >.equals ( final Object  o)
inherited

Equal if the underlying key & value are equal.

Definition at line 31 of file AbstractEntry.java.

31  {
32  if (!(o instanceof Map.Entry)) return false;
33  final Map.Entry e = (Map.Entry)o;
34  return eq(_key, e.getKey()) && eq(_val, e.getValue());
35  }

◆ getKey()

TypeK com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >.getKey ( )
inherited

Return key.

Definition at line 26 of file AbstractEntry.java.

26 { return _key; }

◆ getValue()

TypeV com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >.getValue ( )
inherited

Return val.

Definition at line 28 of file AbstractEntry.java.

28 { return _val; }

◆ hashCode()

int com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >.hashCode ( )
inherited

Compute "key.hashCode() ^ val.hashCode()"

Definition at line 38 of file AbstractEntry.java.

38  {
39  return
40  ((_key == null) ? 0 : _key.hashCode()) ^
41  ((_val == null) ? 0 : _val.hashCode());
42  }

◆ setValue()

TypeV com.cliffc.aa.util.NonBlockingHashMap< TypeK, TypeV >.NBHMEntry.setValue ( final TypeV  val)

Definition at line 1320 of file NonBlockingHashMap.java.

1320  {
1321  if( val == null ) throw new NullPointerException();
1322  _val = val;
1323  return put(_key, val);
1324  }

References com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >._key, com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >._val, com.cliffc.aa.util.NonBlockingHashMap< TypeK, TypeV >.put(), and com.cliffc.aa.util.NonBlockingHashMap< TypeK, TypeV >.val().

Here is the call graph for this function:

◆ toString()

String com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >.toString ( )
inherited

Return "key=val" string.

Definition at line 24 of file AbstractEntry.java.

24 { return _key + "=" + _val; }

Member Data Documentation

◆ _key

◆ _val


The documentation for this class was generated from the following file:
com.cliffc.aa.util.NonBlockingHashMap.val
static final Object val(Object[] kvs, int idx)
Definition: NonBlockingHashMap.java:173
com.cliffc.aa.util.AbstractEntry.eq
static boolean eq(final Object o1, final Object o2)
Definition: AbstractEntry.java:44
com.cliffc.aa.util.NonBlockingHashMap.put
TypeV put(TypeK key, TypeV val)
Maps the specified key to the specified value in the table.
Definition: NonBlockingHashMap.java:310
com.cliffc.aa.util.AbstractEntry._val
TypeV _val
Strongly typed value.
Definition: AbstractEntry.java:19
com.cliffc.aa.util.AbstractEntry._key
final TypeK _key
Strongly typed key.
Definition: AbstractEntry.java:17