@Override protected ChannelVolumeDB valueOf(Map.Entry<String, String>[] attributes) throws InvalidValueException { Channel channel = null; Integer volumeDB = null; for (Map.Entry<String, String> attribute : attributes) { if (attribute.getKey().equals("channel")) channel = Channel.valueOf(attribute.getValue()); if (attribute.getKey().equals("val")) volumeDB = (new UnsignedIntegerTwoBytesDatatype() .valueOf(attribute.getValue())) .getValue().intValue(); // Java is fun! } return channel != null && volumeDB != null ? new ChannelVolumeDB(channel, volumeDB) : null; }
@Override protected ChannelVolume valueOf(Map.Entry<String, String>[] attributes) throws InvalidValueException { Channel channel = null; Integer volume = null; for (Map.Entry<String, String> attribute : attributes) { if (attribute.getKey().equals("channel")) channel = Channel.valueOf(attribute.getValue()); if (attribute.getKey().equals("val")) volume = (new UnsignedIntegerTwoBytesDatatype() .valueOf(attribute.getValue())) .getValue().intValue(); // Java is fun! } return channel != null && volume != null ? new ChannelVolume(channel, volume) : null; }
@Override protected ChannelVolume valueOf(Map.Entry<String, String>[] attributes) throws InvalidValueException { Channel channel = null; Integer volume = null; for (Map.Entry<String, String> attribute : attributes) { if (attribute.getKey().equals("channel")) channel = Channel.valueOf(attribute.getValue()); if (attribute.getKey().equals("val")) volume = (new UnsignedIntegerTwoBytesDatatype() .valueOf(attribute.getValue())) .getValue().intValue(); // Java is fun! } return channel != null && volume != null ? new ChannelVolume(channel, volume) : null; }
@Override protected ChannelVolumeDB valueOf(Map.Entry<String, String>[] attributes) throws InvalidValueException { Channel channel = null; Integer volumeDB = null; for (Map.Entry<String, String> attribute : attributes) { if (attribute.getKey().equals("channel")) channel = Channel.valueOf(attribute.getValue()); if (attribute.getKey().equals("val")) volumeDB = (new UnsignedIntegerTwoBytesDatatype() .valueOf(attribute.getValue())) .getValue().intValue(); // Java is fun! } return channel != null && volumeDB != null ? new ChannelVolumeDB(channel, volumeDB) : null; }
@Override protected ChannelVolumeDB valueOf(Map.Entry<String, String>[] attributes) throws InvalidValueException { Channel channel = null; Integer volumeDB = null; for (Map.Entry<String, String> attribute : attributes) { if (attribute.getKey().equals("channel")) channel = Channel.valueOf(attribute.getValue()); if (attribute.getKey().equals("val")) volumeDB = (new UnsignedIntegerTwoBytesDatatype() .valueOf(attribute.getValue())) .getValue().intValue(); // Java is fun! } return channel != null && volumeDB != null ? new ChannelVolumeDB(channel, volumeDB) : null; }
@Override protected ChannelVolume valueOf(Map.Entry<String, String>[] attributes) throws InvalidValueException { Channel channel = null; Integer volume = null; for (Map.Entry<String, String> attribute : attributes) { if (attribute.getKey().equals("channel")) channel = Channel.valueOf(attribute.getValue()); if (attribute.getKey().equals("val")) volume = (new UnsignedIntegerTwoBytesDatatype() .valueOf(attribute.getValue())) .getValue().intValue(); // Java is fun! } return channel != null && volume != null ? new ChannelVolume(channel, volume) : null; }