Last Minute Fixes

This commit is contained in:
Speiger 2021-09-20 00:52:23 +02:00
parent 86dbed4bf9
commit bc7afad793
5 changed files with 17 additions and 7 deletions

View File

@ -18,7 +18,7 @@ repositories {
}
archivesBaseName = 'Primitive Collections'
version = '0.3.6';
version = '0.4.0';
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

View File

@ -1023,13 +1023,13 @@ public class AVL_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_
public MAP.Entry KEY_VALUE_GENERIC_TYPE higherEntry(KEY_TYPE e) { return super.lowerEntry(e); }
protected AVL_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE findLowest() {
if(fromStart) return m.last;
if(fromStart) return m.first;
AVL_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE entry = loInclusive ? m.findFloorNode(high) : m.findLowerNode(high);
return entry == null || tooHigh(entry.key) ? null : entry;
}
protected AVL_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE findHighest() {
if(toEnd) return m.first;
if(toEnd) return m.last;
AVL_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE entry = hiInclusive ? m.findCeilingNode(low) : m.findHigherNode(low);
return entry == null || tooLow(entry.key) ? null : entry;
}

View File

@ -1077,14 +1077,14 @@ public class RB_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_G
public MAP.Entry KEY_VALUE_GENERIC_TYPE higherEntry(KEY_TYPE e) { return super.lowerEntry(e); }
protected RB_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE findLowest() {
if(fromStart) return m.last;
RB_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE entry = loInclusive ? m.findFloorNode(high) : m.findLowerNode(high);
if(fromStart) return m.first;
RB_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE entry = loInclusive ? m.findCeilingNode(low) : m.findHigherNode(low);
return entry == null || tooHigh(entry.key) ? null : entry;
}
protected RB_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE findHighest() {
if(toEnd) return m.first;
RB_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE entry = hiInclusive ? m.findCeilingNode(low) : m.findHigherNode(low);
if(toEnd) return m.last;
RB_TREE_MAP.Entry KEY_VALUE_GENERIC_TYPE entry = hiInclusive ? m.findFloorNode(high) : m.findLowerNode(high);
return entry == null || tooLow(entry.key) ? null : entry;
}

View File

@ -1,5 +1,9 @@
package speiger.src.collections.PACKAGE.misc.pairs.impl;
#if TYPE_OBJECT || VALUE_OBJECT
import java.util.Objects;
#endif
import speiger.src.collections.PACKAGE.misc.pairs.PAIR;
/**

View File

@ -1,7 +1,13 @@
package speiger.src.collections.PACKAGE.misc.pairs.impl;
#if TYPE_OBJECT || VALUE_OBJECT
import java.util.Objects;
#endif
import speiger.src.collections.PACKAGE.misc.pairs.PAIR;
/**
* Mutable Pair Implementation that
* @Type(T)