예제 #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;
 }
예제 #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;
 }
예제 #4
0
 public function doubleValue()
 {
     \blaze\lang\Double::asNative($this->value);
 }
예제 #5
0
 public function getDouble($identifier)
 {
     $this->checkClosed();
     $val = $this->get($identifier);
     if ($val == null) {
         return null;
     }
     return Double::asNative($val);
 }
예제 #6
0
 public function writeDouble(\double $double)
 {
     $double = \blaze\lang\Double::asNative($double);
     return $this->out->write(serialize($double));
 }
예제 #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;
 }