Java Joda Time - Implement a Date range iterator -
I am trying to apply a date iterator with Joda time without success.
I need something that should start me all day again, start to get started
Do you have any idea about doing this?
There is something for you to start, you can think about whether you want to get involved in the end or not. .
Import org.joda.time. *; Import java.util. *; Class Local Deterrent applies to Iterable & lt; LocalDate & gt; {Private finals start local date; Private ending local debt end; Public Localadat Range (Local Date Start, Local Date End) {this.start = start; This.end = end; } Public Iterator & lt; Local Date & gt; Iterator () {Return the new local data exchange operator (start, end); } Private Static Class Local Dat Range Iterator Ethernet & lt; Local Date & gt; {Private local date current; Private ending local debt end; Private LocalTraderitter (local date start, local date expiration) {this.current = start; This.end = end; } Next in Public Boolean () {Return On! = Null; } Public Local Number Next () {if (current == blank) {New Noah marking exception (); } Local Date Rate = Current; Current = present. Plaid (1); If (current.compareTo (end)> gt; {current = null; } Return return; } Public Zero removal () {new unsupported exception (exception); }}} Class test {public static zero main (string argument []) {local date start = new localized (2009, 7, 20); Local Debt End = New Localized (2009, 8, 3); (For local date: new localet limit (start, end)) {System.out.println (date); }}} This is the time when I wrote an Iterator in Java, so I hope is correct. I think it's great ...
Oh for the #Herator blocks, I can say all this ...
Comments
Post a Comment