Beispiel #1
0
  static {
    Unit min;
    Unit h;
    Unit d;
    Unit a;

    try {
      min = SECOND.scale(60).clone("min");
      h = min.scale(60).clone("h");
      d = h.scale(24).clone("d");
      a = SECOND.scale(3.15569259747e7).clone("a");
      instance = new TimeInterval();
    } catch (Exception e) {
      min = null; // to fool compiler
      h = null; // to fool compiler
      d = null; // to fool compiler
      a = null; // to fool compiler

      System.err.println("TimeInterval.<clinit>(): Couldn't initialize class: " + e);
      System.exit(1);
    }

    MINUTE = min;
    HOUR = h;
    DAY = d;
    YEAR = a;
  }
Beispiel #2
0
 static {
   try {
     instance = new YSpeed();
   } catch (Exception e) {
     System.err.println("YSpeed.<clinit>(): Couldn't initialize class: " + e);
     System.exit(1);
   }
 }
Beispiel #3
0
  static {
    CoordinateSystem coordSys;

    try {
      coordSys =
          new PolarCoordinateSystem(
              CartesianVelocity2D.instance().getRealTupleType(),
              Speed.DEFAULT_UNIT,
              PlaneAngle.DEFAULT_UNIT);
      instance =
          new PolarVelocity(
              "Polar_Velocity",
              (Speed) Speed.instance(),
              (PlaneAngle) PlaneAngle.instance(),
              coordSys);
    } catch (Exception e) {
      System.err.println("PolarVelocity.<clinit>(): Couldn't initialize class: " + e);
      System.exit(1);
    }
  }