Subversion Repository Public Repository

litesoft

Diff Revisions 850 vs 851 for /trunk/Java/core/Anywhere/src/org/litesoft/core/simpletypes/temporal/SimpleDateRange.java

Diff revisions: vs.
  @@ -6,7 +6,8 @@
6 6 /**
7 7 * A Simple Date Range object with variable resolution from the Hour thru the Millisecond.
8 8 */
9 - public final class SimpleDateRange extends DateFormatControl<SimpleDateRange> implements TemporalSimpleType
9 + public final class SimpleDateRange extends CalendarSupport<SimpleDateRange> // TODO: XXX DateFormatControl<SimpleDateRange>
10 + implements TemporalSimpleType
10 11 {
11 12 private static final long serialVersionUID = 1L;
12 13
  @@ -21,21 +22,17 @@
21 22 {
22 23 }
23 24
24 - public SimpleDateRange( String pFormat )
25 - {
26 - super( pFormat );
27 - }
28 -
29 25 public SimpleDateRange( String pFormat, SimpleDate pFromInclusive, SimpleDate pToExclusive )
30 26 {
31 - this( pFormat );
27 + // this( pFormat );
32 28 setFromInclusive( pFromInclusive );
33 29 setToExclusive( pToExclusive );
34 30 }
35 31
36 32 public SimpleDateRange copy()
37 33 {
38 - return new SimpleDateRange( this.getFormat(), this.mFromInclusive, this.mToExclusive );
34 + return new SimpleDateRange( null, // TODO: XXX this.getFormat(),
35 + this.mFromInclusive, this.mToExclusive );
39 36 }
40 37
41 38 /**
  @@ -81,12 +78,13 @@
81 78 {
82 79 if ( (pToCheck != null) )
83 80 {
84 - DateRes thisRes = this.getDateRes();
85 - DateRes themRes = pToCheck.getDateRes();
86 - if ( !thisRes.equals( themRes ) )
87 - {
88 - throw new IllegalArgumentException( "Expected " + thisRes + ", but got " + themRes );
89 - }
81 + // TODO: XXX
82 + // DateRes thisRes = this.getDateRes();
83 + // DateRes themRes = pToCheck.getDateRes();
84 + // if ( !thisRes.equals( themRes ) )
85 + // {
86 + // throw new IllegalArgumentException( "Expected " + thisRes + ", but got " + themRes );
87 + // }
90 88 }
91 89 return pToCheck;
92 90 }
  @@ -107,7 +105,7 @@
107 105 {
108 106 return (this == them) || //
109 107 ((them != null) //
110 - && equal( this.getDateRes(), them.getDateRes() ) //
108 + // TODO: XXX && equal( this.getDateRes(), them.getDateRes() ) //
111 109 && equal( this.mFromInclusive, them.mFromInclusive ) //
112 110 && equal( this.mToExclusive, them.mToExclusive ) //
113 111 );
  @@ -124,7 +122,7 @@
124 122 @Override
125 123 public int compareTo( SimpleDateRange them )
126 124 {
127 - return compareEm( compare( this.getDateRes(), them.getDateRes() ), //
125 + return compareEm( // TODO: XXX compare( this.getDateRes(), them.getDateRes() ), //
128 126 compare( this.mFromInclusive, them.mFromInclusive ), //
129 127 compare( this.mToExclusive, them.mToExclusive ) );
130 128 }