samskivert
c9598b3110
More finality.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2729 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:29:01 +00:00
samskivert
ddd0b0b72a
Untabifying, widening, nixed wacky client version parsing.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2728 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:22:40 +00:00
samskivert
053d4c6196
This can be static final as well.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2727 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:16:52 +00:00
samskivert
28a48351fa
Introduce some finality.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2726 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:16:12 +00:00
samskivert
9cf8d22e1d
Unwrap, use Map.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2725 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:15:50 +00:00
samskivert
2f912d7068
ClassLoader creation apparently must be run as a privileged action so that if
...
unprivileged code calls into privileged code, the security manager "does the
right thing" (I'd explain this better if I understood it better).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2724 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:08:37 +00:00
samskivert
7829ca78dc
Properly close streams.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2723 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:57:07 +00:00
samskivert
033c67d81b
Make sure we close our stream.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2722 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:47:54 +00:00
samskivert
8be87e9412
More Comparable reduction. Made node final in NodeInfo.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2721 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:45:39 +00:00
samskivert
d5de5dc997
Comparable -> Comparator. private -> protected.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2720 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:39:47 +00:00
samskivert
add2871199
To make something Comparable implies that you could do something like stick it
...
into a collection that keeps things sorted. Doing so without implementing
hashCode() and equals() is a recipe for breakage. Instead we'll just define a
comparator that does the one sorting we need, and use that, rather than give
the wrong impression.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2719 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:32:45 +00:00
samskivert
cf7f3a582c
We don't need to manually finalize things here.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2718 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:28:17 +00:00
samskivert
43a06a8acd
Ignoring exceptions is naughty.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2717 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:26:40 +00:00
samskivert
654596a619
Added instanceof checks to equals().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2716 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:25:01 +00:00
samskivert
c9a12f1b3e
Eliminate check for impossible nullness.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2715 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:21:55 +00:00
samskivert
d25492df43
Break not if getSourceClassName() is null.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2714 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:20:07 +00:00
samskivert
c7e16e52b3
Correct and easier to read.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2713 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:14:44 +00:00
samskivert
09d98be8d7
Avoid NPE.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2712 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:13:01 +00:00
samskivert
3a0f8e3fc2
Less wacky.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2711 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:11:43 +00:00
ray.j.greenwell
9b602fd73e
This inferCaller() isn't used, but let's at least format it with spaces instead of tabs.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2710 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-27 21:42:23 +00:00
ray.j.greenwell
2d0625ee75
A sample usage of @ReplacedBy.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2709 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-21 00:52:54 +00:00
ray.j.greenwell
28b9755e3b
Ye olde experiment.
...
I am starting to prefer things in the guava library when there are
equivalents. I've been wondering what we want to do about informing
people about the changes. Something more interesting will happen,
because I want a place to put useful bits of code built atop guava,
and that's not samskivert, at least not now.
So anyway, here's a lighter-weight @Deprecated sorta annotation.
It can be used to indicate methods that have a replacement in guava
(or new stuff in the standard java libraries). It will show up
in the javadocs. Let's see how it looks.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2708 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-21 00:52:21 +00:00
ray.j.greenwell
b09afabba8
Formatting, annotations, and other pedantry from Dave Hoover.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2707 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-18 21:59:57 +00:00
ray.j.greenwell
0534e40a60
Correctly return the new count from add().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2706 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-18 21:56:20 +00:00
ray.j.greenwell
efad5d31f6
Same speed, but create our Entry instead of the int[].
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2705 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-18 09:56:06 +00:00
ray.j.greenwell
c48106695a
Ok, Charlie Groves has done a good job convincing me I'm crazy, but I'll
...
check this in anyway, at least for posterity.
The advantages over the 'CountingMap' (currently in yohoho):
- Faster, because adding to a count doesn't add to a boxed int, nor does
it hash twice (except on the intial use of a particular key).
The disadvantages:
- More complicated implementation (CountingMap builds upon google
collections)
- If a non-HashMap is desired, the fact that the underlying map is
<K, int[]> is exposed.
- When iterating over the entrySet, each entry is a new object
created solely for your iteration.
So.. yeah. I'll check it in. Maybe I'll blow it away. We should
probably think about how samskivert will move forward- do we want to
depend on google-collect or guava? Do we want to deprecate huge
swaths of this library in preference to those? A lot of what's
in here is a bit outdated, but maintained to support code built
atop it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2704 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-16 03:00:23 +00:00
ray.j.greenwell
74d5d82704
Buh-bye.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2703 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-15 01:49:15 +00:00
ray.j.greenwell
2a6397ddcb
I'm just going to commit these for posterity, but I'll remove them.
...
Hell, maybe I should remove IntSets.java too.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2702 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-15 01:48:57 +00:00
ray.j.greenwell
e0e2f1cf7d
AbstractCollection's isEmpty() calls size(). We can often do better:
...
- Provide an implementation in AbstractIntSet that checks the interator
for at least one element.
- Override that in ArrayIntSet so that we're just checking our size again.
- Added optimized isEmpty()s for a few of the inner classes in IntSets.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2701 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-14 21:25:52 +00:00
ray.j.greenwell
8f24b4a8b8
Nix redundant cast.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2700 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 18:57:22 +00:00
ray.j.greenwell
f731c7b406
Nix redundant cast.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2699 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 18:53:15 +00:00
ray.j.greenwell
05d562387c
Added getProbability(), from Dave Hoover.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2698 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 18:34:15 +00:00
ray.j.greenwell
eecca9d71b
Dur, and now that we don't need the @SuppressWarnings, we don't
...
need the temporary variable to which it was applied.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2697 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 17:53:34 +00:00
ray.j.greenwell
959e953f99
Covariant return types for the win.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2696 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 17:50:13 +00:00
ray.j.greenwell
5bf7699dd4
Missed a spot.
...
Oh baby, look at the @SuppressWarnings and cast removal.
It's all itchy, flakey, and pale under the cast!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2695 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 17:49:25 +00:00
ray.j.greenwell
de860c5602
Now that this library is JDK 1.5, let's return the true type from clone().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2694 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 17:44:50 +00:00
samskivert
7480bb2e6c
We should be toString-ing right into our StringBuilder and using the specified
...
open and close boxes for the internal elements of our sequences.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2693 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-11 05:19:38 +00:00
ray.j.greenwell
818e108f99
Nix import.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2692 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-08 22:05:22 +00:00
ray.j.greenwell
d2464d9feb
JDK 1.5 compatibility.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2691 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-08 22:04:02 +00:00
ray.j.greenwell
503d57d7de
I've been messing with IntSets. I won't check in my more esoteric classes
...
(RangeIntSet, CompleteIntSet & ClumpyArrayIntSet (which both are capable
of holding every int, and not maxing out at Integer.MAX_VALUE size)).
But here's a bunch of useful stuff all wrapped up nicely.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2690 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-08 18:52:36 +00:00
ray.j.greenwell
61609ffcd5
Be more efficient if constructed with an Interable.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2689 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-08 18:47:28 +00:00
ray.j.greenwell
32d01f5651
Broke-out the notification that we've been posted to a shutdown RunQueue
...
into a method, so that it can be suppressed, etc.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2688 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-06 20:16:52 +00:00
ray.j.greenwell
838d725bb6
Sorry, Pär, you get slurped up into "et al." like me.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2687 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-06 01:01:03 +00:00
ray.j.greenwell
ff9798927c
Updated copyright dates, and holder. :)
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2686 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-06 00:53:25 +00:00
ray.j.greenwell
f57af39108
Drop unneeded import.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2685 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-06 00:31:57 +00:00
ray.j.greenwell
42c7ea0009
This should be more efficient, right?
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2684 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-06 00:31:36 +00:00
ray.j.greenwell
ee8f1aab7e
Hey, samskivert requires 1.5 now, so let's label our Timer thread.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2683 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-06 00:28:11 +00:00
ray.j.greenwell
99a46d1613
Spell the package name correctly.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2682 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-05 19:02:21 +00:00
ray.j.greenwell
5282228ee9
Move Mapping all the way up to samskivert.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2681 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-05 00:56:19 +00:00
ray.j.greenwell
1a56333166
Nixed unneeded @SuppressWarnings, from Jamie Doornbos.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2680 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-12-14 19:27:20 +00:00