added more comments in a few places
This commit is contained in:
parent
65483965ab
commit
d217a68908
1 changed files with 2 additions and 0 deletions
|
|
@ -104,6 +104,7 @@ namespace std {
|
||||||
public $javaclassname(Collection c) {
|
public $javaclassname(Collection c) {
|
||||||
this();
|
this();
|
||||||
ListIterator<JAVA_VALUE_TYPE> it = listIterator(0);
|
ListIterator<JAVA_VALUE_TYPE> it = listIterator(0);
|
||||||
|
// We should special case the "copy constructor" here to avoid lots of cross-language calls
|
||||||
for (Object o: c) {
|
for (Object o: c) {
|
||||||
it.add((JAVA_VALUE_TYPE)o);
|
it.add((JAVA_VALUE_TYPE)o);
|
||||||
}
|
}
|
||||||
|
|
@ -167,6 +168,7 @@ namespace std {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasPrevious() {
|
public boolean hasPrevious() {
|
||||||
|
// This call to previousIndex() will be much slower than the hasNext() implementation, but it's simpler like this with C++ forward iterators
|
||||||
return previousIndex() != -1;
|
return previousIndex() != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue