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 java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static Layer.ValueFields<java.lang.Boolean>
BOOL
private java.util.function.Function<ProtobufRecord,T>
conversion
(package private) static Layer.ValueFields<java.lang.Double>
DOUBLE
private byte
field
(package private) static Layer.ValueFields<java.lang.Float>
FLOAT
(package private) static Layer.ValueFields<java.lang.Number>
INT64
static java.util.Collection<Layer.ValueFields<?>>
MAPPERS
A collection of methods to map a record to a type(package private) static Layer.ValueFields<java.lang.Number>
SINT64
(package private) static Layer.ValueFields<java.lang.String>
STRING
(package private) static Layer.ValueFields<java.lang.Number>
UINT64
-
Constructor Summary
Constructors Modifier Constructor Description private
ValueFields(int field, java.util.function.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<java.lang.String> STRING
-
FLOAT
static final Layer.ValueFields<java.lang.Float> FLOAT
-
DOUBLE
static final Layer.ValueFields<java.lang.Double> DOUBLE
-
INT64
static final Layer.ValueFields<java.lang.Number> INT64
-
UINT64
static final Layer.ValueFields<java.lang.Number> UINT64
-
SINT64
static final Layer.ValueFields<java.lang.Number> SINT64
-
BOOL
static final Layer.ValueFields<java.lang.Boolean> BOOL
-
MAPPERS
public static final java.util.Collection<Layer.ValueFields<?>> MAPPERS
A collection of methods to map a record to a type
-
field
private final byte field
-
conversion
private final java.util.function.Function<ProtobufRecord,T> conversion
-
-
Constructor Detail
-
ValueFields
private ValueFields(int field, java.util.function.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
-
-