Package com.google.protobuf

Examples of com.google.protobuf.CodedOutputStream.writeDouble()


      } else if (t instanceof Long) {
         out.writeInt64(wrappedInt64, (Long) t);
      } else if (t instanceof Integer) {
         out.writeInt32(wrappedInt32, (Integer) t);
      } else if (t instanceof Double) {
         out.writeDouble(wrappedDouble, (Double) t);
      } else if (t instanceof Float) {
         out.writeFloat(wrappedFloat, (Float) t);
      } else if (t instanceof Boolean) {
         out.writeBool(wrappedBool, (Boolean) t);
      } else if (t instanceof byte[]) {
View Full Code Here


      int fieldNumber = fd.getNumber();
      Descriptors.FieldDescriptor.Type type = fd.getType();
      switch (type) {
         case DOUBLE:
            for (Object value : collection) {  //todo check (value != null && value.getClass() == elementClass)
               out.writeDouble(fieldNumber, (Double) value);
            }
            break;
         case FLOAT:
            for (Object value : collection) {
               out.writeFloat(fieldNumber, (Float) value);
View Full Code Here

      } else if (t instanceof Long) {
         out.writeInt64(wrappedInt64, (Long) t);
      } else if (t instanceof Integer) {
         out.writeInt32(wrappedInt32, (Integer) t);
      } else if (t instanceof Double) {
         out.writeDouble(wrappedDouble, (Double) t);
      } else if (t instanceof Float) {
         out.writeFloat(wrappedFloat, (Float) t);
      } else if (t instanceof Boolean) {
         out.writeBool(wrappedBool, (Boolean) t);
      } else if (t instanceof byte[]) {
View Full Code Here

      int fieldNumber = fd.getNumber();
      Type type = fd.getType();
      switch (type) {
         case DOUBLE:
            for (Object value : collection) {  //todo check (value != null && value.getClass() == elementClass)
               out.writeDouble(fieldNumber, (Double) value);
            }
            break;
         case FLOAT:
            for (Object value : collection) {
               out.writeFloat(fieldNumber, (Float) value);
View Full Code Here

      int fieldNumber = fd.getNumber();
      Type type = fd.getType();
      switch (type) {
         case DOUBLE:
            for (Object value : collection) {  //todo check (value != null && value.getClass() == elementClass)
               out.writeDouble(fieldNumber, (Double) value);
            }
            break;
         case FLOAT:
            for (Object value : collection) {
               out.writeFloat(fieldNumber, (Float) value);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.