Beispiel #1
0
 void comprobar()
 {
     if (actual.get() > maxima.get())
     {
         actual.reduce(actual.get() - maxima.get());
         this.avisar("max");
     }
     else if (actual.get() <= 0)
     {
         actual.add(actual.get());
         this.avisar("0");
     }
 }
Beispiel #2
0
 public ParametroRecargable(UInt refmaxima, Observer objetivo)
 {
     maxima          = refmaxima;
     actual          = new Float(refmaxima.get());
     involucrado     = objetivo;
     bloqueado_sumar = bloqueado_restar = false;
 }
Beispiel #3
0
        public int CompareTo(object obj)
        {
            UInt comp = (UInt)obj;

            return(get().CompareTo(comp.get()));
        }