Return the instance of the given codec. @param id The numeric ID of the codec (the first byte in storage). @return The instance of the given codec @throws IllegalArgumentException if no codec was found for the given ID.
(final int id)
| 146 | * @throws IllegalArgumentException if no codec was found for the given ID. |
| 147 | */ |
| 148 | public HistogramDataPointCodec getCodec(final int id) { |
| 149 | final HistogramDataPointCodec codec = codecs.get(id); |
| 150 | if (codec == null) { |
| 151 | throw new IllegalArgumentException("No codec found mapped to ID " + id); |
| 152 | } |
| 153 | return codec; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Return the ID of the given codec. |