Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/FixingsOverview.java @ 6999:3e93f29281bc
Fix for flys/issue1479: The indices of the dates of the analysis periods where re-mapped wrong.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 12 Sep 2013 16:35:07 +0200 |
parents | c5ce9812388b |
children | 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
6998:e96d3f6c7c42 | 6999:3e93f29281bc |
---|---|
768 | 768 |
769 protected Date start; | 769 protected Date start; |
770 protected Date end; | 770 protected Date end; |
771 | 771 |
772 public DateRangeFilter(Date start, Date end) { | 772 public DateRangeFilter(Date start, Date end) { |
773 this.start = start; | 773 if (start.before(end)) { |
774 this.end = end; | 774 this.start = start; |
775 this.end = end; | |
776 } | |
777 else { | |
778 this.start = end; | |
779 this.end = start; | |
780 } | |
775 } | 781 } |
776 | 782 |
777 @Override | 783 @Override |
778 public boolean accept(Fixing.Column column) { | 784 public boolean accept(Fixing.Column column) { |
779 Date date = column.getStartTime(); | 785 Date date = column.getStartTime(); |
780 return start.compareTo(date) <= 0 && end.compareTo(date) >= 0; | 786 // start <= date <= end |
787 return !(date.before(start) || date.after(end)); | |
781 } | 788 } |
782 } // class DateRangeFilter | 789 } // class DateRangeFilter |
783 | 790 |
784 public static class SectorFilter implements Fixing.Filter { | 791 public static class SectorFilter implements Fixing.Filter { |
785 | 792 |