1f2a1396ee
Ray points out that addAll() and putAll() were already added to CollectionUtil.
samskivert
2010-09-30 21:39:31 +00:00
e8b633abaf
Some tests, just for kicks.
samskivert
2010-09-30 21:35:55 +00:00
8f781ea4cf
Oops, missed a spot.
samskivert
2010-09-30 21:26:52 +00:00
510d31b138
Let's go ahead and add general fold and reduce even though I've held off on adding a function type to samskivert because everyone and their mother has a function type. This is hopefully innocuous enough and allows you to obtain generality at the expense of verbosity:
samskivert
2010-09-30 21:26:26 +00:00
eeed7f2d2e
More functional utilities from Mr Greenwell (with some name tweaks by MDB). He so wants to be using Scala. For example, in Java:
samskivert
2010-09-30 21:02:37 +00:00
4c622ea5c8
(From Mr Greenwell) Reduction in size of Logger implementations via some abstraction, and inlining of LogBuilder code into doLog() so that odd trailing log arguments can be included without borking our ability to also include a Throwable as the final argument.
samskivert
2010-09-30 20:31:41 +00:00
f12cf8a04e
- Append chars when possible, and avoid any String concatination. - Made arrayStr static, soften the Exception thrown.
ray.j.greenwell
2010-09-21 23:00:07 +00:00
48951845b3
Oh crap. The Loggers don't strip out the Exception if it's the last element, so they actually *depend* on this ignoring the last odd element. Revert my last change until I figure some reasonable compromise out.
ray.j.greenwell
2010-09-21 20:25:35 +00:00
5cbde1b456
Created an addAll() that folds a supplied Iterable of Collections into the starter collection using addAll. Certain Collections, like guava's Multiset have optimized addAll() methods that recognize other Multisets. There is also a putAll() equivalent for Maps.
ray.j.greenwell
2010-09-21 02:11:03 +00:00
8c9adfd8f8
Ray rolled back the bit that needed this one.
karma@deadmoose.com
2010-09-17 20:54:40 +00:00
590be465d7
Why are we silently ignoring the last argument if someone passes in an odd number?
ray.j.greenwell
2010-09-17 20:53:00 +00:00
ef34b921b2
Need to import those to use them.
karma@deadmoose.com
2010-09-17 20:47:54 +00:00
42e4c4138d
Reverted r2884. If someone wants to use StringUtil.toString(), let them get the openBox/closeBox/separators they were expected.
ray.j.greenwell
2010-09-17 20:45:56 +00:00
0dc4418fd2
Do not use StringUtil.toString() to log any arguments. As detailed in my last checkin.
ray.j.greenwell
2010-09-17 20:44:22 +00:00
7dba599509
Just call toString() on a Collection rather than iterating over it ourselves.
ray.j.greenwell
2010-09-17 20:23:41 +00:00
8e33cc2cd7
Shareable references to common 0-length arrays.
ray.j.greenwell
2010-09-14 00:40:05 +00:00
62c86b38f7
Append the final "]" using the StringBuilder.
ray.j.greenwell
2010-09-13 19:50:22 +00:00
5f5a261e0d
Go ahead and build and ship the Velocity and Digester stuff. Most of the Velocity stuff actually works with a non-hacked Velocity implementation, and specifically VelocityUtil and ClasspathResourceLoader are used all over the place for great justice, so we want to support that.
samskivert
2010-09-11 04:28:04 +00:00
58f0b9a067
A test of some basic HsqldbLiaison behavior, which I added to test other things, which ended up being infeasible. But I'll leave this test machinery here as it may be useful in the future if we want to add more com.samskivert.jdcb unit tests.
samskivert
2010-09-10 23:48:48 +00:00
87731adf48
[maven-release-plugin] prepare for next development iteration
samskivert
2010-09-10 16:15:13 +00:00
6c97376395
This only works when we fork the compiler. Also managed to bork my dash.
samskivert
2010-09-10 16:09:49 +00:00
6d2269e465
OMFG. The inmates are running the asylum.
samskivert
2010-09-10 16:02:38 +00:00
9b55d58add
We apparently need the current version to be a -SNAPSHOT version to perform a release.
samskivert
2010-09-10 15:12:54 +00:00
8c54d3689c
Link to the project page from the Javadocs.
samskivert
2010-09-09 20:24:42 +00:00
c201ac6d9f
Add plugin declarations for these plugins so that we get the latest versions. Sigh.
samskivert
2010-09-09 20:17:26 +00:00
d1c37e5b36
Omit Javadocs for protected members. They clutter up the documentation of the public interfaces and if you are making use of protected members, you should be looking at the source.
samskivert
2010-09-09 20:10:42 +00:00
d159774dff
Minor edit.
samskivert
2010-09-09 18:22:21 +00:00
eb85d7d40b
Bye bye Ivy. Even though I like you better, building with Maven makes publishing to the public Maven repositories much simpler. Being published to the public Maven repositories makes life easier for everyone who wants to depend on samskivert.
samskivert
2010-09-09 18:21:54 +00:00
db601ce31f
Include our GWT source bits directly in the main jar.
samskivert
2010-09-09 17:44:44 +00:00
eb4b4b90dd
Not specifying a plugin version number is interpreted by Maven as "use whatever fucking arbitrary version you like". Fortunately, it is possible to instruct Maven to do what would be the sensible default: use the latest release version of the plugin.
samskivert
2010-09-09 04:44:52 +00:00
155c8bada1
This is in the resources directory now, sadly.
samskivert
2010-09-08 22:57:12 +00:00
5cae01afd6
Second entry into "Why Maven sucks" journal:
samskivert
2010-09-08 22:56:00 +00:00
9699eceea7
First entry into "Why Maven sucks" journal:
samskivert
2010-09-08 21:28:27 +00:00
312d38c6b7
GPG plugin configuration, as Sonatype requires published artifacts to be GPG signed.
samskivert
2010-09-08 19:50:26 +00:00
90758faa6e
Er, libs-incl.xml rather.
samskivert
2010-09-08 19:08:53 +00:00
802b4b36ca
Restore libs.dir, that is used in deps-incl.xml.
samskivert
2010-09-08 19:08:36 +00:00
08bb3da8a7
We don't need ehcache here.
samskivert
2010-09-08 19:08:01 +00:00
3269bc4db9
Oops, didn't mean to commit that old cruft.
samskivert
2010-09-08 19:06:27 +00:00
e68daada41
Properly configure javadoc in our POM build. The POM is now approaching the line count of the build.xml file, but I suppose that's just because XML is absurdly verbose (and Maven annoyingly chose to do things like <quiet>true</quiet> instead of a quiet="true" attribute). I wonder if there's a Maven plugin that allows you to specify your pom.xml in YAML or some less verbose format and which automatically converts it to XML. That'd probably cut the line count by 2/3.
samskivert
2010-09-08 19:04:33 +00:00
579d706075
Nix some obsolete tests directories.
samskivert
2010-09-08 18:52:36 +00:00
ea80aad970
Nix old scripts. Everything's handled via Ant or Ivy or Maven these days.
samskivert
2010-09-08 18:44:41 +00:00
baef3bccb1
Put our non-source resources into src/main/resources to comply with the standard Maven layout.
samskivert
2010-09-08 18:41:41 +00:00
91e8240a48
Fiddling with persistent properties in tests is dangerous. Let's be sure that our tests pass even when we haven't run them before. We were relying on sub.sub3 having been set and persisted from a previous test invocation.
samskivert
2010-09-08 18:35:08 +00:00
ff243af527
Hosting our own Ivy repository is a burden on library users. We really want to publish our bits to the Maven central repository, which means we need to gird our loins and wade into the ninth circle of hell: a Mavenized build.
samskivert
2010-09-08 16:22:48 +00:00
39f3b63dbe
I broke this in 2845; probably want to check the values in the bucket, not just the bucket. Thanks, Mr. Hoover
charlie.groves
2010-09-02 20:50:37 +00:00
087dbd0e9b
Remove unecessary import and implementation
charlie.groves
2010-08-31 01:13:11 +00:00
60224534e9
SVN need not concern itself with our compiled goodies.
karma@deadmoose.com
2010-08-30 18:52:23 +00:00
22a849a5d4
Unit tests not needing the assertion imports seems like a bad sign. Let's actually turn these "tests" into tests.
samskivert
2010-08-30 18:33:09 +00:00
695fe90bf5
Tell eclipse about the new way things are organized.
karma@deadmoose.com
2010-08-30 17:23:48 +00:00
3e77445126
We want our ivy.xml in ivys/ivy.xml as well.
samskivert
2010-08-28 01:28:36 +00:00
bc034443ba
app.name -> lib.name, made use of lib.name in a few places where we were repeating ourselves.
samskivert
2010-08-28 01:16:37 +00:00
5d2ed20918
Modified build to create and publish source and javadoc jar files.
samskivert
2010-08-28 01:10:42 +00:00
c8c748614b
I think I understand Ivy well enough now to define sane dependencies. Of course these differ from the "standard definitions", but I'm going to stick with my usual approach of assuming that everyone else is crazy.
samskivert
2010-08-27 23:36:44 +00:00
c55a9c44a9
Edits and trimming.
samskivert
2010-08-27 21:33:16 +00:00
1e7529f069
These excludes are no longer needed.
samskivert
2010-08-27 21:22:01 +00:00
9d6ba1f4ee
Minor edits.
samskivert
2010-08-27 08:45:54 +00:00
11e68cab8a
Nixed lib/README and updated top-level README to suggest using build-ivy.xml.
samskivert
2010-08-27 08:44:07 +00:00
c0dc419e49
Pared down the dependency checking. A lot of it has become obsolete over the years.
samskivert
2010-08-27 08:40:24 +00:00
b566967dd7
Nixed SBT-based build. SBT ended up being a little too Scala-focused.
samskivert
2010-08-27 08:39:40 +00:00
26cd0928ba
A build file that uses Ivy to obtain all dependencies.
samskivert
2010-08-27 08:38:43 +00:00
4a4f41e9fb
Get all of our dependencies (except the hacked version of Velocity) via Maven.
samskivert
2010-08-27 05:52:58 +00:00
c4120f1ab9
Ignore kooky file with @Test annotations that's not actually a test.
samskivert
2010-08-27 05:04:46 +00:00
bd61c7a609
Let's turn this into an actual test.
samskivert
2010-08-27 05:03:45 +00:00
1002d68495
A basic SBT build system which I'll most likely eventually use to publish to the centralized Maven repository.
samskivert
2010-08-27 00:53:30 +00:00
08fa16d2d8
Handle test resources in a more standard way as well.
samskivert
2010-08-27 00:51:49 +00:00
83e1c95c34
Converted all tests to JUnit 4. Nixed vestigial Velocity-related test class.
samskivert
2010-08-27 00:34:13 +00:00
b03237ee4d
Though it's perhaps not exactly as I'd prefer, a consensus has formed on where to put your source and test source code for Java projects. I'm going to toe the line here because I want to use SBT to publish samskivert to the centralized Maven repositories.
samskivert
2010-08-27 00:08:06 +00:00
3dcef4a00c
Micro-optimization: don't test the array length if we just created it at the right size.
ray.j.greenwell
2010-08-25 19:05:17 +00:00
b78365ea6d
- Fixed toArray(T[]) to terminate with null if the provided array has room to spare, per the spec. - Document that we do not support null elements. - Increment modCount in our modifying methods, to take advantage of fail-fast iterators. - A few small comments.
ray.j.greenwell
2010-08-25 19:00:38 +00:00
8a45193748
Don't do anything on clear if the set is already empty.
andrzej@threerings.net
2010-08-17 04:48:13 +00:00
d1f5c4593f
Added some explanatory comments.
andrzej@threerings.net
2010-08-11 19:57:54 +00:00
756c2f44ad
Added a HashIntSet class that uses hashing with linear probing to get most of the memory benefits of ArrayIntSet and better performance than a HashSet<Integer> (presumably because of less boxing and better spatial locality). The downside is that you need to pick a sentinel value that can't be stored in the set, but that's not a problem in any application for which I've ever used an IntSet. In some (admittedly simplistic) Google Caliper testing, HashIntSet was 22% faster than ArrayIntSet and 73% faster than HashSet for arrays of size N=10, 100% faster than ArrayIntSet and 69% faster than HashSet for N=100, and 357% faster than ArrayIntSet and 74% faster than HashSet for N=1000.
andrzej@threerings.net
2010-08-11 05:20:43 +00:00
9ed1bfeedc
Annotate both of these with a @ReplacedBy.
ray.j.greenwell
2010-07-19 21:02:10 +00:00
8d28d119db
There's a perfectly valid replacement in java.util for this as of 1.5. I haven't deprecated our version in CollectionUtil because it copes with being passed a null array...
ray.j.greenwell
2010-07-16 19:03:37 +00:00
0b6b97e8c0
Update this @ReplacedBy annotation to show that we'd need nullsLast().
ray.j.greenwell
2010-07-14 19:17:56 +00:00
1f9786d291
Use the char version of String.replace when possible.
ray.j.greenwell
2010-07-13 00:56:07 +00:00
ca1141f3ca
Correct error in last commit.
ray.j.greenwell
2010-07-13 00:45:45 +00:00
83bfe030d8
It's deprecated, so don't use it.
karma@deadmoose.com
2010-07-13 00:38:02 +00:00
591211a399
Deprecate this, String itself has a replace() method.
ray.j.greenwell
2010-07-08 23:48:20 +00:00