Esempio n. 1
0
 /**
  *
  * @param blaze\lang\Integer|int $value
  * @return blaze\lang\ClassWrapper
  */
 public static function getNumberClass($value)
 {
     if (self::$numberClasses == null) {
         self::lazyInit();
     }
     if (Byte::isType($value)) {
         return self::$numberClasses[0];
     } else {
         if (Short::isType($value)) {
             return self::$numberClasses[1];
         } else {
             if (Integer::isType($value)) {
                 return self::$numberClasses[4];
             } else {
                 if (Long::isType($value)) {
                     return self::$numberClasses[5];
                 } else {
                     if (Float::isType($value)) {
                         return self::$numberClasses[3];
                     } else {
                         if (Double::isType($value)) {
                             return self::$numberClasses[2];
                         } else {
                             if (BigInteger::isType($value)) {
                                 return self::$numberClasses[6];
                             } else {
                                 if (BigDecimal::isType($value)) {
                                     return self::$numberClasses[7];
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return null;
 }
Esempio n. 2
0
 public function doubleValue()
 {
     return Double::asNative($this->value);
 }
 public function setDouble($identifier, $value)
 {
     $this->set($identifier, \blaze\lang\Double::asNative($value), \PDO::PARAM_STR);
     return $this;
 }
Esempio n. 4
0
 public function doubleValue()
 {
     \blaze\lang\Double::asNative($this->value);
 }
Esempio n. 5
0
 public function getDouble($identifier)
 {
     $this->checkClosed();
     $val = $this->get($identifier);
     if ($val == null) {
         return null;
     }
     return Double::asNative($val);
 }
 public function writeDouble(\double $double)
 {
     $double = \blaze\lang\Double::asNative($double);
     return $this->out->write(serialize($double));
 }
Esempio n. 7
-1
 public function readDouble()
 {
     $result = unserialize($this->getNext());
     if (!\blaze\lang\Double::isType($result)) {
         throw new \blaze\lang\ClassCastException('The next token is not a double');
     }
     return $result;
 }