1 8 package org.apache.avalon.excalibur.source.validity; 9 10 import org.apache.avalon.excalibur.source.SourceValidity; 11 12 18 public final class TimeStampValidity 19 implements SourceValidity { 20 21 private long timeStamp; 22 23 public TimeStampValidity(long timeStamp) { 24 this.timeStamp = timeStamp; 25 } 26 27 32 public boolean isValid() { 33 return false; 34 } 35 36 public boolean isValid(SourceValidity newValidity) { 37 if (newValidity instanceof TimeStampValidity) { 38 return this.timeStamp == ((TimeStampValidity)newValidity).getTimeStamp(); 39 } 40 return false; 41 } 42 43 public long getTimeStamp() { 44 return this.timeStamp; 45 } 46 47 public String toString() { 48 return "TimeStampValidity: " + this.timeStamp; 49 } 50 51 } 52 | Popular Tags |