/**
  * Enter description here...
  * @throws SerializationException
  * 
  * @return void
  */
 public static function serialize(SerializationStreamWriter $streamWriter, $instance, MappedClass $instanceClass)
 {
     if ($instance instanceof Double) {
         $streamWriter->writeDouble($instance->doubleValue());
     } else {
         $streamWriter->writeDouble($instance);
     }
     //$streamWriter->writeDouble($instance);
 }
 /**
  * 
  *
  * @param SerializationStreamWriter $streamWriter
  * @param unknown_type $instance
  * @throws SerializationException
  */
 public static function serialize(SerializationStreamWriter $streamWriter, $instance, MappedClass $instanceClass)
 {
     $itemCount = count($instance);
     $streamWriter->writeInt($itemCount);
     for ($itemIndex = 0; $itemIndex < $itemCount; ++$itemIndex) {
         $streamWriter->writeDouble($instance[$itemIndex]);
     }
 }
 public static function serialize(SerializationStreamWriter $streamWriter, $instance)
 {
     $streamWriter->writeDouble($instance->getValue());
 }