int ix = (nk.hashCode() & mask); if (mNames[ix] == null) { // no collision mNames[ix] = nk;
/** * @return True if the set contains specified name; false if not. */ public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }
int ix = (nk.hashCode() & mask); if (mNames[ix] == null) { // no collision mNames[ix] = nk;
int ix = (nk.hashCode() & mask); if (mNames[ix] == null) { // no collision mNames[ix] = nk;
int ix = (nk.hashCode() & mask); if (mNames[ix] == null) { // no collision mNames[ix] = nk;
int ix = (nk.hashCode() & mask); if (mNames[ix] == null) { // no collision mNames[ix] = nk;
/** * @return True if the set contains specified name; false if not. */ public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }
/** * @return True if the set contains specified name; false if not. */ @Override public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }
/** * @return True if the set contains specified name; false if not. */ @Override public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }
/** * @return True if the set contains specified name; false if not. */ @Override public boolean contains(PrefixedName name) { PrefixedName[] hashArea = mNames; int index = name.hashCode() & (hashArea.length - 1); PrefixedName res = hashArea[index]; if (res != null && res.equals(name)) { return true; } Bucket[] buckets = mBuckets; if (buckets != null) { for (Bucket bucket = buckets[index >> 2]; bucket != null; bucket = bucket.getNext()) { res = bucket.getName(); if (res.equals(name)) { return true; } } } return false; }