Small fixes.
-Fixed: Some imports. -Fixed: containsValue for OpenHashMap was not checking nullEntry properly
This commit is contained in:
parent
e69c675f82
commit
ede40f06d0
|
@ -7,7 +7,6 @@ import java.util.AbstractCollection;
|
|||
import java.util.function.Consumer;
|
||||
#endif
|
||||
|
||||
import speiger.src.collections.PACKAGE.collections.COLLECTION;
|
||||
#if !TYPE_OBJECT
|
||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||
import speiger.src.collections.PACKAGE.utils.ITERATORS;
|
||||
|
|
|
@ -14,7 +14,6 @@ import speiger.src.collections.PACKAGE.functions.function.TO_OBJECT_FUNCTION;
|
|||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||
import speiger.src.collections.PACKAGE.functions.function.UNARY_OPERATOR;
|
||||
import speiger.src.collections.PACKAGE.collections.SPLIT_ITERATOR;
|
||||
import speiger.src.collections.PACKAGE.lists.LIST;
|
||||
import speiger.src.collections.PACKAGE.lists.ARRAY_LIST;
|
||||
#if !TYPE_BOOLEAN
|
||||
|
|
|
@ -316,6 +316,7 @@ public class CUSTOM_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VAL
|
|||
#if !VALUE_OBJECT
|
||||
@Override
|
||||
public boolean containsValue(VALUE_TYPE value) {
|
||||
if(containsNull && VALUE_EQUALS(values[nullIndex], value)) return true;
|
||||
for(int i = nullIndex;i >= 0;i--)
|
||||
if(!strategy.equals(keys[i], EMPTY_KEY_VALUE) && VALUE_EQUALS(values[i], value)) return true;
|
||||
return false;
|
||||
|
@ -325,7 +326,12 @@ public class CUSTOM_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VAL
|
|||
@Override
|
||||
@ValuePrimitive
|
||||
public boolean containsValue(Object value) {
|
||||
for(int i = nullIndex;i >= 0;i--)
|
||||
#if VALUE_OBJECT
|
||||
if(containsNull && VALUE_EQUALS(values[nullIndex], value)) return true;
|
||||
#else
|
||||
if(containsNull && ((value == null && values[nullIndex] == getDefaultReturnValue()) || EQUALS_VALUE_TYPE(values[nullIndex], value))) return true;
|
||||
#endif
|
||||
for(int i = nullIndex-1;i >= 0;i--)
|
||||
#if VALUE_OBJECT
|
||||
if(!strategy.equals(keys[i], EMPTY_KEY_VALUE) && EQUALS_VALUE_TYPE(values[i], value)) return true;
|
||||
#else
|
||||
|
|
|
@ -287,7 +287,8 @@ public class HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GENE
|
|||
#if !VALUE_OBJECT
|
||||
@Override
|
||||
public boolean containsValue(VALUE_TYPE value) {
|
||||
for(int i = nullIndex;i >= 0;i--)
|
||||
if(containsNull && VALUE_EQUALS(values[nullIndex], value)) return true;
|
||||
for(int i = nullIndex-1;i >= 0;i--)
|
||||
if(KEY_EQUALS_NOT_NULL(keys[i]) && VALUE_EQUALS(values[i], value)) return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -296,7 +297,12 @@ public class HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GENE
|
|||
@Override
|
||||
@ValuePrimitive
|
||||
public boolean containsValue(Object value) {
|
||||
for(int i = nullIndex;i >= 0;i--)
|
||||
#if VALUE_OBJECT
|
||||
if(containsNull && VALUE_EQUALS(values[nullIndex], value)) return true;
|
||||
#else
|
||||
if(containsNull && ((value == null && values[nullIndex] == getDefaultReturnValue()) || EQUALS_VALUE_TYPE(values[nullIndex], value))) return true;
|
||||
#endif
|
||||
for(int i = nullIndex-1;i >= 0;i--)
|
||||
#if VALUE_OBJECT
|
||||
if(KEY_EQUALS_NOT_NULL(keys[i]) && EQUALS_VALUE_TYPE(values[i], value)) return true;
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue