Exemplo n.º 1
0
 public function getByte($identifier)
 {
     $this->checkClosed();
     $val = $this->get($identifier);
     if ($val == null) {
         return null;
     }
     return Byte::asNative($val);
 }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
0
 public function byteValue()
 {
     return Byte::asNative($this->value);
 }
 public function setByte($identifier, $value)
 {
     $this->set($identifier, \blaze\lang\Byte::asNative($value), \PDO::PARAM_INT);
     return $this;
 }
Exemplo n.º 5
0
 public function readByte()
 {
     $result = unserialize($this->getNext());
     if (!\blaze\lang\Byte::isType($result)) {
         throw new \blaze\lang\ClassCastException('The next token is not a byte');
     }
     return $result;
 }
Exemplo n.º 6
0
 public function byteValue()
 {
     \blaze\lang\Byte::asNative($this->getIntVal());
 }
Exemplo n.º 7
0
 public function shortValue()
 {
     return \blaze\lang\Byte::asNative($this->value);
 }
Exemplo n.º 8
0
 public function writeByte(\byte $byte)
 {
     $byte = \blaze\lang\Byte::asNative($byte);
     return $this->out->write(serialize($byte));
 }