/** * Sets a <code>Object</code> for the specified tag. * * @param tagType the tag's value as an int * @param value the value for the specified tag * @throws NullPointerException if value is <code>null</code> */ @java.lang.SuppressWarnings( { "ConstantConditions", "UnnecessaryBoxing" }) public void setObject(int tagType, @NotNull Object value) { if (value == null) throw new NullPointerException("cannot set a null object"); if (!_tagMap.containsKey(Integer.valueOf(tagType))) { _definedTagList.add(new Tag(tagType, this)); } // else { // final Object oldValue = _tagMap.get(tagType); // if (!oldValue.equals(value)) // addError(String.format("Overwritten tag 0x%s (%s). Old=%s, New=%s", Integer.toHexString(tagType), getTagName(tagType), oldValue, value)); // } _tagMap.put(tagType, value); }
/** * Sets a <code>Object</code> for the specified tag. * * @param tagType the tag's value as an int * @param value the value for the specified tag * @throws NullPointerException if value is <code>null</code> */ @java.lang.SuppressWarnings( { "ConstantConditions", "UnnecessaryBoxing" }) public void setObject(int tagType, @NotNull Object value) { if (value == null) throw new NullPointerException("cannot set a null object"); if (!_tagMap.containsKey(Integer.valueOf(tagType))) { _definedTagList.add(new Tag(tagType, this)); } // else { // final Object oldValue = _tagMap.get(tagType); // if (!oldValue.equals(value)) // addError(String.format("Overwritten tag 0x%s (%s). Old=%s, New=%s", Integer.toHexString(tagType), getTagName(tagType), oldValue, value)); // } _tagMap.put(tagType, value); }