Commit graph

9 commits

Author SHA1 Message Date
William S Fulton
90d2ba884c Java std::list std::vector - test addAll and subList 2017-06-26 13:42:19 +01:00
William S Fulton
c686045f55 More efficient add implementation for Java std::list
The default implementation in AbstractSequentialList<E>
calls add(size(), e) and size() might be expensive.
2017-06-24 23:33:31 +01:00
William S Fulton
ea55c5bba0 Java std::vector std::list enhancements
- Add missing vector copy constructor
- Add constructor to initialize the containers. Note that Java's
  equivalent constructor for ArrayList just sets the capacity, whereas
  the wrappers behave like the C++ constructor and set the size. I've
  done this mainly because there has been a vector(size_type) constructor
  in the Java wrappers for many years, so best to keep this unchanged.
2017-06-24 14:30:03 +01:00
William S Fulton
428b332e68 Improve Java std::list std::vector runtime tests and wrap std::list::clear 2017-06-23 15:42:59 +01:00
William S Fulton
bc7c80b862 More Java vector runtime tests 2017-06-05 19:33:45 +01:00
William S Fulton
65abd9558d Merge branch 'java-vector-test'
* java-vector-test:
  Java std_vector runtime test

Conflicts:
	Examples/test-suite/java/li_std_vector_runme.java
2017-06-05 19:23:31 +01:00
William S Fulton
30b7424f8e Java std_vector runtime test
From Volker Diels-Grabsch in SF patch https://sourceforge.net/p/swig/patches/278/
2017-06-05 19:15:32 +01:00
Vadim Zeitlin
c79dd9d420 Make std::vector<> wrappers conform to List interface in Java
Derive the class wrapping std::vector<> in Java from java.util.AbstractList<>.
This makes it possible to use it with various algorithms working with Java
collections and, maybe even more importantly, makes it possible to iterate
over the wrapped vectors using for-each loops.

This commit is based on the original patch by Volker Diels-Grabsch from
https://sourceforge.net/p/swig/patches/278/
2016-11-29 17:46:38 +01:00
William S Fulton
d551b655f2 vector wrapper runtime tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8071 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-26 23:31:28 +00:00