Commit Graph

788 Commits

Author SHA1 Message Date
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 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
samskivert 41fdf8142f Comment clarification from Jamie.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2601 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-28 04:59:21 +00:00
samskivert 804fda60a7 getParameters() does not throw a DataValidationException. Also made methods
return interfaces.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2600 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-28 01:28:13 +00:00
samskivert f861968c92 From Dave: comment fix and unused import nix.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2599 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-21 23:11:41 +00:00
samskivert 537ecbb8a3 Added some protection requested by the person who usually things that people
should not be protected from themselves.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2598 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-20 22:43:56 +00:00
samskivert 9f56deec63 Made schedule methods more fluent, made execution path of main schedule method
more obvious to the compiler.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2597 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-20 22:28:05 +00:00
samskivert 6c69cd0b20 Log a warning and cancel a repeating interval if it attempts to post itself to
a RunQueue that has been shutdown.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2596 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-20 22:13:26 +00:00
samskivert 8ac364d1d2 Added methods for creating an interval that execute a Runnable when they
expire. Whoa, composable software. Amazing. We should have done this eight
years ago.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2595 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-20 22:07:29 +00:00
samskivert 8510eaee93 Improved ArrayIntSet unit tests. Updated to JUnit4.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2594 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-14 17:53:21 +00:00
samskivert af5ebf8cc7 Fixed ArrayIntSet constructor, made equals() use AbstractSet when not comparing
against another ArrayIntSet which will provide contents-based equality with
other sets.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2593 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-14 17:53:00 +00:00
samskivert b5af1884b3 Sometimes the platform default charset is appropriate. Like when you're turning
the results of Process.getOutputStream() into a string.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2592 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-13 02:21:06 +00:00
samskivert 80ccf8dd16 Charset is not supported on 1.5 and we don't really need to be using it anyway.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2591 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-13 00:25:54 +00:00
samskivert be689f7135 Another convenience.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2590 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-12 21:24:48 +00:00
samskivert 0711e29d39 Ramp up the fancy.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2589 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-12 21:18:45 +00:00
samskivert 9ba1410a46 Allow code that already has a reader to rock right on as well.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2587 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-12 20:55:37 +00:00
samskivert 5c46986b00 I grow tired of having a commons-io dependency (and all the crap that comes
along with it just to have essentially two methods:

copy(InputStream,OutputStream) and toString(InputStream)

We'll just duplicate those ten lines of code and save a dozen of our libraries
some trouble. This is a precursor to a possible Velocity jihad because Velocity
is pissing me off by not working because of some bullshit classloader
tomfoolery that is the sort of thing that makes Java programmers want to jump
butt first off the building.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2586 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-12 20:52:39 +00:00
samskivert 96f48149a2 Patch from Dave to avoid potential disaster when Java decides remove(Integer)
should mean a call to remove(Object) instead of unboxing the integer and
calling remove(int). Beware bogus boxing.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2585 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-10 23:40:11 +00:00
samskivert 8296003607 As Dave points out (or perhaps Dave's Eclipse), we're implementing an IntSet
method here not overriding an AbstractSet method here.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2584 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-10 23:13:49 +00:00
samskivert 297466ec29 Factored some bits into AbstractIntSet, added keySet() to IntIntMap.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2583 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-10 22:45:48 +00:00
samskivert 18acdb2401 Check for circular dependency of very small diameter, from Mike T.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2582 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-07 18:32:55 +00:00
samskivert 2f35801566 Provide a constructor that allows the class loader used to load the properties
files to be supplied. I'm amazed I haven't needed this sooner. Clearly I
haven't been doing enough class loader jockeying in the last decade.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2581 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-30 21:28:56 +00:00
samskivert 999c17a4fb An operation that automatically closes all opened statements when it completes.
Courtesy of Mr Groves.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2580 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-23 23:05:06 +00:00
samskivert 4092913008 Nixed unused imports.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2579 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-22 23:51:56 +00:00
samskivert a7fff912ff Need to quote that. Oh how we love primitive database technologies.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2578 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-22 19:52:41 +00:00
samskivert 972c741ae3 Sessions don't need integer ids. We can just pretend like they're not there and
this code will work equally well on our existing sessions tables and new ones
that have no sessionId.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2577 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-22 18:26:44 +00:00
samskivert 62a87561ea Patch from Charlie to extract Logger.format into LogBuilder class.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2576 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-12 21:29:20 +00:00
samskivert 406600dc87 Use a safer compare().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2575 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-09 18:42:31 +00:00