Merge branch 'zphensley42-master'

* zphensley42-master:
  Handle review comments
  Updated java std_map to support Obj derivatives by importing original for use in class
This commit is contained in:
William S Fulton 2019-02-23 16:30:04 +00:00
commit a57326aa4f
5 changed files with 17 additions and 17 deletions

View file

@ -43,7 +43,7 @@ namespace std {
this(); this();
java.util.ListIterator<$typemap(jboxtype, T)> it = listIterator(0); java.util.ListIterator<$typemap(jboxtype, T)> it = listIterator(0);
// Special case the "copy constructor" here to avoid lots of cross-language calls // Special case the "copy constructor" here to avoid lots of cross-language calls
for (Object o : c) { for (java.lang.Object o : c) {
it.add(($typemap(jboxtype, T))o); it.add(($typemap(jboxtype, T))o);
} }
} }

View file

@ -57,7 +57,7 @@ template<class K, class T, class C = std::less< K> > class map {
return sizeImpl(); return sizeImpl();
} }
public boolean containsKey(Object key) { public boolean containsKey(java.lang.Object key) {
if (!(key instanceof $typemap(jboxtype, K))) { if (!(key instanceof $typemap(jboxtype, K))) {
return false; return false;
} }
@ -65,7 +65,7 @@ template<class K, class T, class C = std::less< K> > class map {
return containsImpl(($typemap(jboxtype, K))key); return containsImpl(($typemap(jboxtype, K))key);
} }
public $typemap(jboxtype, T) get(Object key) { public $typemap(jboxtype, T) get(java.lang.Object key) {
if (!(key instanceof $typemap(jboxtype, K))) { if (!(key instanceof $typemap(jboxtype, K))) {
return null; return null;
} }
@ -90,7 +90,7 @@ template<class K, class T, class C = std::less< K> > class map {
} }
} }
public $typemap(jboxtype, T) remove(Object key) { public $typemap(jboxtype, T) remove(java.lang.Object key) {
if (!(key instanceof $typemap(jboxtype, K))) { if (!(key instanceof $typemap(jboxtype, K))) {
return null; return null;
} }

View file

@ -59,7 +59,7 @@ class set {
public boolean addAll(java.util.Collection<? extends $typemap(jboxtype, T)> collection) { public boolean addAll(java.util.Collection<? extends $typemap(jboxtype, T)> collection) {
boolean didAddElement = false; boolean didAddElement = false;
for (Object object : collection) { for (java.lang.Object object : collection) {
didAddElement |= add(($typemap(jboxtype, T))object); didAddElement |= add(($typemap(jboxtype, T))object);
} }
@ -96,7 +96,7 @@ class set {
} }
public boolean containsAll(java.util.Collection<?> collection) { public boolean containsAll(java.util.Collection<?> collection) {
for (Object object : collection) { for (java.lang.Object object : collection) {
if (!contains(object)) { if (!contains(object)) {
return false; return false;
} }
@ -105,7 +105,7 @@ class set {
return true; return true;
} }
public boolean contains(Object object) { public boolean contains(java.lang.Object object) {
if (!(object instanceof $typemap(jboxtype, T))) { if (!(object instanceof $typemap(jboxtype, T))) {
return false; return false;
} }
@ -115,14 +115,14 @@ class set {
public boolean removeAll(java.util.Collection<?> collection) { public boolean removeAll(java.util.Collection<?> collection) {
boolean didRemoveElement = false; boolean didRemoveElement = false;
for (Object object : collection) { for (java.lang.Object object : collection) {
didRemoveElement |= remove(object); didRemoveElement |= remove(object);
} }
return didRemoveElement; return didRemoveElement;
} }
public boolean remove(Object object) { public boolean remove(java.lang.Object object) {
if (!(object instanceof $typemap(jboxtype, T))) { if (!(object instanceof $typemap(jboxtype, T))) {
return false; return false;
} }

View file

@ -57,7 +57,7 @@ template<class K, class T> class unordered_map {
return sizeImpl(); return sizeImpl();
} }
public boolean containsKey(Object key) { public boolean containsKey(java.lang.Object key) {
if (!(key instanceof $typemap(jboxtype, K))) { if (!(key instanceof $typemap(jboxtype, K))) {
return false; return false;
} }
@ -65,7 +65,7 @@ template<class K, class T> class unordered_map {
return containsImpl(($typemap(jboxtype, K))key); return containsImpl(($typemap(jboxtype, K))key);
} }
public $typemap(jboxtype, T) get(Object key) { public $typemap(jboxtype, T) get(java.lang.Object key) {
if (!(key instanceof $typemap(jboxtype, K))) { if (!(key instanceof $typemap(jboxtype, K))) {
return null; return null;
} }
@ -90,7 +90,7 @@ template<class K, class T> class unordered_map {
} }
} }
public $typemap(jboxtype, T) remove(Object key) { public $typemap(jboxtype, T) remove(java.lang.Object key) {
if (!(key instanceof $typemap(jboxtype, K))) { if (!(key instanceof $typemap(jboxtype, K))) {
return null; return null;
} }

View file

@ -59,7 +59,7 @@ class unordered_set {
public boolean addAll(java.util.Collection<? extends $typemap(jboxtype, T)> collection) { public boolean addAll(java.util.Collection<? extends $typemap(jboxtype, T)> collection) {
boolean didAddElement = false; boolean didAddElement = false;
for (Object object : collection) { for (java.lang.Object object : collection) {
didAddElement |= add(($typemap(jboxtype, T))object); didAddElement |= add(($typemap(jboxtype, T))object);
} }
@ -96,7 +96,7 @@ class unordered_set {
} }
public boolean containsAll(java.util.Collection<?> collection) { public boolean containsAll(java.util.Collection<?> collection) {
for (Object object : collection) { for (java.lang.Object object : collection) {
if (!contains(object)) { if (!contains(object)) {
return false; return false;
} }
@ -105,7 +105,7 @@ class unordered_set {
return true; return true;
} }
public boolean contains(Object object) { public boolean contains(java.lang.Object object) {
if (!(object instanceof $typemap(jboxtype, T))) { if (!(object instanceof $typemap(jboxtype, T))) {
return false; return false;
} }
@ -115,14 +115,14 @@ class unordered_set {
public boolean removeAll(java.util.Collection<?> collection) { public boolean removeAll(java.util.Collection<?> collection) {
boolean didRemoveElement = false; boolean didRemoveElement = false;
for (Object object : collection) { for (java.lang.Object object : collection) {
didRemoveElement |= remove(object); didRemoveElement |= remove(object);
} }
return didRemoveElement; return didRemoveElement;
} }
public boolean remove(Object object) { public boolean remove(java.lang.Object object) {
if (!(object instanceof $typemap(jboxtype, T))) { if (!(object instanceof $typemap(jboxtype, T))) {
return false; return false;
} }