Class Layer.ValueFields<T>
- java.lang.Object
-
- org.openstreetmap.josm.data.imagery.vectortile.mapbox.Layer.ValueFields<T>
-
- Enclosing class:
- Layer
private static final class Layer.ValueFields<T> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static Layer.ValueFields<Boolean>
BOOL
private Function<ProtobufRecord,T>
conversion
(package private) static Layer.ValueFields<Double>
DOUBLE
private byte
field
(package private) static Layer.ValueFields<Float>
FLOAT
(package private) static Layer.ValueFields<Number>
INT64
static Collection<Layer.ValueFields<?>>
MAPPERS
A collection of methods to map a record to a type(package private) static Layer.ValueFields<Number>
SINT64
(package private) static Layer.ValueFields<String>
STRING
(package private) static Layer.ValueFields<Number>
UINT64
-
Constructor Summary
Constructors Modifier Constructor Description private
ValueFields(int field, Function<ProtobufRecord,T> conversion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
convertValue(ProtobufRecord protobufRecord)
Convert a protobuf record to a valuebyte
getField()
Get the field identifier for the value
-
-
-
Field Detail
-
STRING
static final Layer.ValueFields<String> STRING
-
FLOAT
static final Layer.ValueFields<Float> FLOAT
-
DOUBLE
static final Layer.ValueFields<Double> DOUBLE
-
INT64
static final Layer.ValueFields<Number> INT64
-
UINT64
static final Layer.ValueFields<Number> UINT64
-
SINT64
static final Layer.ValueFields<Number> SINT64
-
BOOL
static final Layer.ValueFields<Boolean> BOOL
-
MAPPERS
public static final Collection<Layer.ValueFields<?>> MAPPERS
A collection of methods to map a record to a type
-
field
private final byte field
-
conversion
private final Function<ProtobufRecord,T> conversion
-
-
Constructor Detail
-
ValueFields
private ValueFields(int field, Function<ProtobufRecord,T> conversion)
-
-
Method Detail
-
getField
public byte getField()
Get the field identifier for the value- Returns:
- The identifier
-
convertValue
public T convertValue(ProtobufRecord protobufRecord)
Convert a protobuf record to a value- Parameters:
protobufRecord
- The record to convert- Returns:
- the converted value
-
-