Y
Y
Yu Yu2014-08-23 13:56:55
Java
Yu Yu, 2014-08-23 13:56:55

What is the simplest entity to use to store a key-value array in Java?

I extract data from the database ["measurement channel" - "measurement date" - "measurement value"].
Nothing better comes to mind, except for an ArrayList of several HashMap by the number of channels in the form

Map<timestamp, float> mapValuesChannelOne = new HashMap<>();

There won't be much processing. The data is already ordered by date, it remains to remake it in XML and send it to the client via http.
Is there anything easier or better to use?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-08-23
Protko @Fesor

What's wrong with the hashmap list? In theory, there is nothing more optimal to do ... except to abandon lists in favor of arrays.

R
Roman, 2016-09-30
@Terran37

There are special entities of that format, if I don't forget, I'll send it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question