ray.j.greenwell
bdda88cd45
Actually, let's go ahead and NPE or CCE in remove() and contains() if
...
the specified object is not an Integer. We're allowed to do that
per the Collection interface spec, and ArrayIntSet previously had
that behavior (but the IntMap keySets did not...).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2651 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-11-24 20:34:44 +00:00
ray.j.greenwell
e8e6c95565
Undo this, the NPE will happen automatically..
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2650 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-11-24 20:29:19 +00:00
ray.j.greenwell
5443630f99
IntSet/Interator cleanup.
...
- Fully filled-out AbstractIntSet with default implementations of most
things and documented the two methods that must be provided (interator()
and size()) as well as the ones that should probably be overridden for
performance or to make one mutable.
- Fixed implementations of contains(Object o) and remove(Object o) to not NPE.
- Return hashCode() identically to the way Set<Integer> would.
- Created an AbstractInterator.
- Added notes where I believe an implementation is bogus...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2649 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-11-24 20:28:00 +00:00
ray.j.greenwell
dd4f8da52a
One last try, to support usages in yohoho, as advised by Michael Thomas.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2648 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-11-19 23:47:48 +00:00
ray.j.greenwell
a0425478d6
Ok, let's specify it the other way around, per feedback from Michael Thomas.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2647 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-11-19 23:39:49 +00:00
ray.j.greenwell
bb34cba00f
Wow, the signatures on these were way wrong. Let's fix them and break
...
binary compatibilty! Whee!
I genericized these when I was first using generics, before I understood the
"PECS" rule.
It seems to me that these could be
<T> Collection<T> addAll (Collection<T> col, Iterator<? extends T> iter);
(rather than)
<T> Collection<? super T> addAll (Collection<? super T> col, Iterator<T> iter);
..but in fact there is already a java.util.Collections.addAll() that takes
an array and specifies the type as that of the producer.
So I followed that. I'm not sure which would be more correct.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2646 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-11-19 22:17:12 +00:00
ray.j.greenwell
690c58a6ff
Added toArray() that accepts a runtime-type token class literal and creates
...
an array of the correct size.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2645 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-11-19 22:04:06 +00:00
ray.j.greenwell
dee9bbc5f9
Callers can add their own prefix.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2644 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-11-09 20:48:47 +00:00
ray.j.greenwell
eabe6e3e66
More options for pad() and prepad() to support toColorString().
...
Name change? Different default prefix? RFC.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2643 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-11-09 19:19:54 +00:00
samskivert
096e7d34a8
Javadoc fix from Dave.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2642 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-10-20 01:44:20 +00:00
samskivert
2868785c8f
Alas, changing the schedule() signature breaks a ton of Game Gardens games, so
...
I'm rolling back the fluency addition. It's not sufficiently useful to merit
the breakage, especially since you can do (_foo = new Interval()).schedule() to
achieve much the same effect. Boo for backwards binary compatibility.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2641 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-10-04 23:26:00 +00:00
samskivert
46b8db852c
Added newFile(base, part, part, ...).
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2640 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-29 23:41:06 +00:00
samskivert
f6c34ddf91
More Galileo hygiene.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2639 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-15 04:53:39 +00:00
samskivert
da789e49a8
Be explicit about our nooploops.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2638 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-15 04:39:28 +00:00
samskivert
09b591acab
Some Galileo inspired raw type elimination.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2637 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-14 22:17:51 +00:00
samskivert
ffddb37f29
Don't claim to be running until we're actually running.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2636 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-10 19:29:09 +00:00
par.winzell
6efb1f06f0
Remove unused imports.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2635 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-09 13:51:24 +00:00
par.winzell
741869aeb6
Tabs to spaces.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2634 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-09 13:51:10 +00:00
samskivert
65ce0f2a35
Added Calendars.withCopy() at Jamie's request.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2633 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-08 17:16:35 +00:00
samskivert
59270e834d
Added @Deprecated annotation.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2632 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-08 17:16:13 +00:00
samskivert
aee97922c4
Extract the proxied Connection creation code into a JDBCUtil method.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2631 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-04 17:25:45 +00:00
samskivert
61ea0e1457
The javacs wants this to have a proper @Deprecated annotation.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2630 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-04 01:53:04 +00:00
samskivert
9f98fce1eb
Commit first, ask questions later, that's what I always say.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2629 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-04 01:51:20 +00:00
samskivert
669d77a097
getResult() sounds like an accessor. computeResult() is more evocative (or
...
should I say, invocative).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2628 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-04 01:50:06 +00:00
ray.j.greenwell
b2ec1d4a8a
I kinda want to usher in a brave new era of unit usage.
...
But I haven't done it yet.
And I've learned recently that since we're not synchronizing
we're not guaranteeing that each thread is seeing the latest result.
But these all seem to work for us.
So I'll commit this now, from Charlie Groves, and we can
fiddle in the future.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2627 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-09-02 01:12:33 +00:00
samskivert
ce92a45fa9
Use the same specificity in Calendars.at().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2626 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-26 22:39:19 +00:00
samskivert
5be7b4e4fe
Javadoc edit.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2625 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-26 22:38:34 +00:00
samskivert
ef967ef1fd
Nixed setHour() and setMinute() as the concensus is that you'll addHour(),
...
etc. from a midnighted calendar.
Also added at(year, month, day) to the builder so that you can do:
Calendars.in(zone).at(2009, Calendar.JANUARY, 1)
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2624 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-26 22:35:15 +00:00
ray.j.greenwell
daad15fb38
Going ahead with my version of this.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2623 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-26 21:20:59 +00:00
samskivert
31018d5b04
Nixed the year/month/day setters as those are obviated by obtaining an
...
instances configured to the desired year month and day. Also added the
requisite warning about using the Calendar month constants to the appropriate
at() method.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2622 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-26 21:15:07 +00:00
ray.j.greenwell
ef344de759
Go ahead and add at least this version of at() from Charlie Groves.
...
We may add some other at()s, and probably remove all the set*() methods, because
they are not that useful and ambiguous w/r/t HOUR vs. HOUR_OF_DAY, etc.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2621 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-26 19:39:14 +00:00
samskivert
a2f29dea1d
A new all-singing all-dancing calendar API that Ray, Charlie and I agree is
...
better than using java.util.Calendar directly. Also moved CalendarUtil methods
into Calendars and deprecated the lot of them.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2620 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-25 22:30:52 +00:00
samskivert
e0f82678b4
Javadoc fixes.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2619 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-25 20:24:20 +00:00
samskivert
f66abe26b9
Fluency is nice.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2618 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-24 22:06:49 +00:00
samskivert
a21bc48820
Added a constructor that takes a Collection<Integer>. Widened and rearranged
...
the methods into a sane order.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2617 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-20 21:53:59 +00:00
samskivert
1e530cd63d
Replace isEmpty() with getPendingUnits().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2616 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-18 23:38:42 +00:00
samskivert
abbef6fab5
This needs to include the util package as well.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2615 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-18 22:38:25 +00:00
samskivert
88d6bf86da
We need to export our ByteEnum stuff to GWT.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2614 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-18 22:06:33 +00:00
samskivert
2ddd1d0b7a
Moving ByteEnum into samskivert so that Ray can get optimizey with Narya over
...
the wire enums.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2613 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-18 22:01:42 +00:00
samskivert
e39909699e
Added setUsername().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2612 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-17 21:29:35 +00:00
samskivert
e358487bad
If you haven't logged in since 2004, then you're not getting your legacy
...
password updated. Sorry kid.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2611 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-17 21:28:26 +00:00
samskivert
1568e0b356
Some @Override annotations from Charlie.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2610 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-17 21:09:38 +00:00
samskivert
72cd55565c
From Charlie: preserve the whole exception as our cause.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2609 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-17 21:09:26 +00:00
samskivert
3e1de492ed
From Charlie: fixed bug in size() and some hygeine.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2608 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-17 21:09:02 +00:00
samskivert
7945e1e9b5
We need to report missing files thisaway.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2607 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-14 22:28:29 +00:00
samskivert
a2d5413da9
Create our own ClasspathResourceLoader that does not suffer from the annoying
...
URLConnection jar resource caching problem. Wired up a simple test case for
same.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2606 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-12 23:31:33 +00:00
samskivert
b2acdc7393
Added isEmpty().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2605 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-08-11 21:08:47 +00:00
samskivert
e721f79227
As Ray suggests, just use a float. That's what I get for cutting and pasting
...
code.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2604 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-31 21:44:13 +00:00
samskivert
ca20f3efe6
This is handled by OOOSiteIdentifier now.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2603 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-31 21:43:48 +00:00
samskivert
a3ae16ef3c
Fix penniesToDollars().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2602 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-31 21:31:17 +00:00