< prev index next >

src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFTag.java

Print this page

        

*** 238,248 **** * * @throws IllegalArgumentException if {@code datatype} is * less than {@code MIN_DATATYPE} or greater than * {@code MAX_DATATYPE}. */ ! public static int getSizeOfType(int dataType) { if (dataType < MIN_DATATYPE ||dataType > MAX_DATATYPE) { throw new IllegalArgumentException("dataType out of range!"); } return SIZE_OF_TYPE[dataType]; --- 238,248 ---- * * @throws IllegalArgumentException if {@code datatype} is * less than {@code MIN_DATATYPE} or greater than * {@code MAX_DATATYPE}. */ ! public static final int getSizeOfType(int dataType) { if (dataType < MIN_DATATYPE ||dataType > MAX_DATATYPE) { throw new IllegalArgumentException("dataType out of range!"); } return SIZE_OF_TYPE[dataType];
*** 251,270 **** /** * Returns the name of the tag, as it will appear in image metadata. * * @return the tag name, as a {@code String}. */ ! public String getName() { return name; } /** * Returns the integer used to represent the tag. * * @return the tag number, as an {@code int}. */ ! public int getNumber() { return number; } /** * Returns a bit mask indicating the set of data types that may --- 251,270 ---- /** * Returns the name of the tag, as it will appear in image metadata. * * @return the tag name, as a {@code String}. */ ! public final String getName() { return name; } /** * Returns the integer used to represent the tag. * * @return the tag number, as an {@code int}. */ ! public final int getNumber() { return number; } /** * Returns a bit mask indicating the set of data types that may
*** 277,287 **** * </pre> * * @return an {@code int} containing a bitmask encoding the * set of valid data types. */ ! public int getDataTypes() { return dataTypes; } /** * Returns the value count of this tag. If this value is positive, it --- 277,287 ---- * </pre> * * @return an {@code int} containing a bitmask encoding the * set of valid data types. */ ! public final int getDataTypes() { return dataTypes; } /** * Returns the value count of this tag. If this value is positive, it
*** 292,302 **** * or it may be variable as in the case of most {@code US-ASCII} * fields. * * @return the value count of this tag. */ ! public int getCount() { return count; } /** * Returns {@code true} if the given data type --- 292,302 ---- * or it may be variable as in the case of most {@code US-ASCII} * fields. * * @return the value count of this tag. */ ! public final int getCount() { return count; } /** * Returns {@code true} if the given data type
*** 310,320 **** * * @throws IllegalArgumentException if {@code datatype} is * less than {@code MIN_DATATYPE} or greater than * {@code MAX_DATATYPE}. */ ! public boolean isDataTypeOK(int dataType) { if (dataType < MIN_DATATYPE || dataType > MAX_DATATYPE) { throw new IllegalArgumentException("datatype not in range!"); } return (dataTypes & (1 << dataType)) != 0; } --- 310,320 ---- * * @throws IllegalArgumentException if {@code datatype} is * less than {@code MIN_DATATYPE} or greater than * {@code MAX_DATATYPE}. */ ! public final boolean isDataTypeOK(int dataType) { if (dataType < MIN_DATATYPE || dataType > MAX_DATATYPE) { throw new IllegalArgumentException("datatype not in range!"); } return (dataTypes & (1 << dataType)) != 0; }
*** 322,332 **** /** * Returns the {@code TIFFTagSet} of which this tag is a part. * * @return the containing {@code TIFFTagSet}. */ ! public TIFFTagSet getTagSet() { return tagSet; } /** * Returns {@code true} if this tag is used to point to an IFD --- 322,332 ---- /** * Returns the {@code TIFFTagSet} of which this tag is a part. * * @return the containing {@code TIFFTagSet}. */ ! public final TIFFTagSet getTagSet() { return tagSet; } /** * Returns {@code true} if this tag is used to point to an IFD
*** 340,361 **** * <p>Many TIFF extensions use the IFD mechanism in order to limit the * number of new tags that may appear in the root IFD.</p> * * @return {@code true} if this tag points to an IFD. */ ! public boolean isIFDPointer() { return tagSet != null || isDataTypeOK(TIFF_IFD_POINTER); } /** * Returns {@code true} if there are mnemonic names associated with * the set of legal values for the data associated with this tag. Mnemonic * names apply only to tags which have integral data type. * * @return {@code true} if mnemonic value names are available. */ ! public boolean hasValueNames() { return valueNames != null; } /** * Adds a mnemonic name for a particular value that this tag's data may take --- 340,361 ---- * <p>Many TIFF extensions use the IFD mechanism in order to limit the * number of new tags that may appear in the root IFD.</p> * * @return {@code true} if this tag points to an IFD. */ ! public final boolean isIFDPointer() { return tagSet != null || isDataTypeOK(TIFF_IFD_POINTER); } /** * Returns {@code true} if there are mnemonic names associated with * the set of legal values for the data associated with this tag. Mnemonic * names apply only to tags which have integral data type. * * @return {@code true} if mnemonic value names are available. */ ! public final boolean hasValueNames() { return valueNames != null; } /** * Adds a mnemonic name for a particular value that this tag's data may take
*** 380,390 **** * @param value the data value. * * @return the mnemonic name associated with the value, as a * {@code String}. */ ! public String getValueName(int value) { if (valueNames == null) { return null; } return valueNames.get(Integer.valueOf(value)); } --- 380,390 ---- * @param value the data value. * * @return the mnemonic name associated with the value, as a * {@code String}. */ ! public final String getValueName(int value) { if (valueNames == null) { return null; } return valueNames.get(Integer.valueOf(value)); }
*** 395,405 **** * non-{@code null} only for values contained in the returned array. * Mnemonic names apply only to tags which have integral data type. * * @return the values for which there is a mnemonic name. */ ! public int[] getNamedValues() { int[] intValues = null; if (valueNames != null) { Set<Integer> values = valueNames.keySet(); Iterator<Integer> iter = values.iterator(); intValues = new int[values.size()]; --- 395,405 ---- * non-{@code null} only for values contained in the returned array. * Mnemonic names apply only to tags which have integral data type. * * @return the values for which there is a mnemonic name. */ ! public final int[] getNamedValues() { int[] intValues = null; if (valueNames != null) { Set<Integer> values = valueNames.keySet(); Iterator<Integer> iter = values.iterator(); intValues = new int[values.size()];
< prev index next >