예제 #1
0
 public DateTickUnit(DateTickUnitType unitType, int multiple, DateTickUnitType rollUnitType, int rollMultiple, DateFormat formatter)
   : base((double) DateTickUnit.getMillisecondCount(unitType, multiple))
 {
   DateTickUnit dateTickUnit = this;
   if (formatter == null)
   {
     string str = "Null 'formatter' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (multiple <= 0)
   {
     string str = "Requires 'multiple' > 0.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (rollMultiple <= 0)
   {
     string str = "Requires 'rollMultiple' > 0.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.unitType = unitType;
     this.count = multiple;
     this.rollUnitType = rollUnitType;
     this.rollCount = rollMultiple;
     this.formatter = formatter;
     this.unit = DateTickUnit.unitTypeToInt(unitType);
     this.rollUnit = DateTickUnit.unitTypeToInt(rollUnitType);
   }
 }
예제 #2
0
 public DateTickUnit(DateTickUnitType unitType, int multiple, DateFormat formatter)
   : this(unitType, multiple, unitType, multiple, formatter)
 {
 }
예제 #3
0
 public DateTickUnit(DateTickUnitType unitType, int multiple)
   : this(unitType, multiple, DateFormat.getDateInstance(3))
 {
 }