/** * @return the FieldType of FLOAT with the given name */ public static FieldType floatType(String name) { return new FieldType(name, FieldType.Type.FLOAT); }
/** * @return the FieldType of INTEGER with the given name */ public static FieldType intType(String name) { return new FieldType(name, FieldType.Type.INTEGER); }
/** * @return the FieldType of DOUBLE with the given name */ public static FieldType doubleType(String name) { return new FieldType(name, FieldType.Type.DOUBLE); }
/** * @return the FieldType of STRING with the given name */ public static FieldType stringType(String name) { return new FieldType(name, FieldType.Type.STRING); }
/** * @return the FieldType of BYTES with the given name */ public static FieldType bytesType(String name) { return new FieldType(name, FieldType.Type.BYTES); }
/** * @return the FieldType of LONG with the given name */ public static FieldType longType(String name) { return new FieldType(name, FieldType.Type.LONG); }
/** * Create a field with string value. * * @param name name of the field * @param value value of the field * @return a field with type string */ public static Field<String> stringField(String name, @Nullable String value) { return new Field<>(new FieldType(name, FieldType.Type.STRING), value); }
/** * Create a field with float value. * * @param name name of the field * @param value value of the field * @return a field with type float */ public static Field<Float> floatField(String name, @Nullable Float value) { return new Field<>(new FieldType(name, FieldType.Type.FLOAT), value); }
/** * Create a field with double value. * * @param name name of the field * @param value value of the field * @return a field with type double */ public static Field<Double> doubleField(String name, @Nullable Double value) { return new Field<>(new FieldType(name, FieldType.Type.DOUBLE), value); }
/** * Create a field with integer value. * * @param name name of the field * @param value value of the field * @return a field with type integer */ public static Field<Integer> intField(String name, @Nullable Integer value) { return new Field<>(new FieldType(name, FieldType.Type.INTEGER), value); }
/** * Create a field with long value. * * @param name name of the field * @param value value of the field * @return a field with type long */ public static Field<Long> longField(String name, @Nullable Long value) { return new Field<>(new FieldType(name, FieldType.Type.LONG), value); }
/** * Create a field with byte[] value. * * @param name name of the field * @param value value of the field * @return a field with type BYTES */ public static Field<byte[]> bytesField(String name, @Nullable byte[] value) { return new Field<>(new FieldType(name, FieldType.Type.BYTES), value); }