aa
com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.NBHMLEntry Class Reference
Inheritance diagram for com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.NBHMLEntry:
[legend]
Collaboration diagram for com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.NBHMLEntry:
[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

 NBHMLEntry (final Long k, final TypeV v)
 

Static Private Member Functions

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

Detailed Description

Definition at line 1192 of file NonBlockingHashMapLong.java.

Constructor & Destructor Documentation

◆ NBHMLEntry()

com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.NBHMLEntry.NBHMLEntry ( final Long  k,
final TypeV  v 
)
package

Definition at line 1193 of file NonBlockingHashMapLong.java.

1193 { 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  }

◆ 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.NonBlockingHashMapLong< TypeV >.NBHMLEntry.setValue ( final TypeV  val)

Definition at line 1194 of file NonBlockingHashMapLong.java.

1194  {
1195  if (val == null) throw new NullPointerException();
1196  _val = val;
1197  return put(_key, val);
1198  }

References com.cliffc.aa.util.AbstractEntry< Long, TypeV >._key, com.cliffc.aa.util.AbstractEntry< Long, TypeV >._val, and com.cliffc.aa.util.NonBlockingHashMapLong< TypeV >.put().

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

final TypeK com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >._key
protectedinherited

Strongly typed key.

Definition at line 17 of file AbstractEntry.java.

◆ _val

TypeV com.cliffc.aa.util.AbstractEntry< TypeK, TypeV >._val
protectedinherited

Strongly typed value.

Definition at line 19 of file AbstractEntry.java.


The documentation for this class was generated from the following file:
com.cliffc.aa.util.AbstractEntry< Long, TypeV >::eq
static boolean eq(final Object o1, final Object o2)
Definition: AbstractEntry.java:44
com.cliffc.aa.util.AbstractEntry< Long, TypeV >::_val
TypeV _val
Strongly typed value.
Definition: AbstractEntry.java:19
com.cliffc.aa.util.AbstractEntry< Long, TypeV >::_key
final TypeK _key
Strongly typed key.
Definition: AbstractEntry.java:17
com.cliffc.aa.util.NonBlockingHashMapLong.put
TypeV put(long key, TypeV val)
Maps the specified key to the specified value in the table.
Definition: NonBlockingHashMapLong.java:278