@SuppressWarnings("SameParameterValue") void set1stProperty(long id, byte[] value) { getFirstSection().setProperty((int)id, value); }
/** * Convenience method returning the value of the property with the specified ID. * If the property is not available, {@code null} is returned and a subsequent * call to {@link #wasNull} will return {@code true}. * * @param id The property ID * @return The property value * @throws NoSingleSectionException if the {@link PropertySet} has * more or less than one {@link Section}. */ protected Object getProperty(final int id) throws NoSingleSectionException { return getFirstSection().getProperty(id); }
void remove1stProperty(long id) { getFirstSection().removeProperty(id); }
/** * Convenience method returning the value of a boolean property with the * specified ID. If the property is not available, {@code false} is returned. * A subsequent call to {@link #wasNull} will return {@code true} to let the * caller distinguish that case from a real property value of {@code false}. * * @param id The property ID * @return The property value * @throws NoSingleSectionException if the {@link PropertySet} has * more or less than one {@link Section}. */ boolean getPropertyBooleanValue(final int id) throws NoSingleSectionException { return getFirstSection().getPropertyBooleanValue(id); }
void set1stProperty(long id, boolean value) { getFirstSection().setProperty((int)id, value); }
void set1stProperty(long id, int value) { getFirstSection().setProperty((int)id, value); }
/** * Convenience method returning the {@link Property} array contained in this * property set. It is a shortcut for getting he {@link PropertySet}'s * {@link Section}s list and then getting the {@link Property} array from the * first {@link Section}. * * @return The properties of the only {@link Section} of this * {@link PropertySet}. * @throws NoSingleSectionException if the {@link PropertySet} has * more or less than one {@link Section}. */ public Property[] getProperties() throws NoSingleSectionException { return getFirstSection().getProperties(); }
void set1stProperty(long id, String value) { getFirstSection().setProperty((int)id, value); }
/** * Convenience method returning the value of the numeric * property with the specified ID. If the property is not * available, 0 is returned. A subsequent call to {@link #wasNull} * will return {@code true} to let the caller distinguish * that case from a real property value of 0. * * @param id The property ID * @return The propertyIntValue value * @throws NoSingleSectionException if the {@link PropertySet} has * more or less than one {@link Section}. */ int getPropertyIntValue(final int id) throws NoSingleSectionException { return getFirstSection().getPropertyIntValue(id); }
/** * Checks whether the property which the last call to {@link * #getPropertyIntValue} or {@link #getProperty} tried to access * was available or not. This information might be important for * callers of {@link #getPropertyIntValue} since the latter * returns 0 if the property does not exist. Using wasNull, * the caller can distinguish this case from a * property's real value of 0. * * @return {@code true} if the last call to {@link * #getPropertyIntValue} or {@link #getProperty} tried to access a * property that was not available, else {@code false}. * @throws NoSingleSectionException if the {@link PropertySet} has * more than one {@link Section}. */ public boolean wasNull() throws NoSingleSectionException { return getFirstSection().wasNull(); }
/** * Checks whether this {@link PropertySet} is a Document Summary Information. * * @return {@code true} if this {@link PropertySet} * represents a Document Summary Information, else {@code false}. */ public boolean isDocumentSummaryInformation() { return !sections.isEmpty() && matchesSummary(getFirstSection().getFormatID(), DocumentSummaryInformation.FORMAT_ID); }
/** * Checks whether this {@link PropertySet} represents a Summary Information. * * @return {@code true} if this {@link PropertySet} * represents a Summary Information, else {@code false}. */ public boolean isSummaryInformation() { return !sections.isEmpty() && matchesSummary(getFirstSection().getFormatID(), SummaryInformation.FORMAT_ID); }
/** * Convenience method returning the value of the property with the specified ID. * If the property is not available, {@code null} is returned and a subsequent * call to {@link #wasNull} will return {@code true}. * * @param id The property ID * @return The property value * @throws NoSingleSectionException if the {@link PropertySet} has * more or less than one {@link Section}. */ protected Object getProperty(final int id) throws NoSingleSectionException { return getFirstSection().getProperty(id); }
void remove1stProperty(long id) { getFirstSection().removeProperty(id); }
@SuppressWarnings("SameParameterValue") void set1stProperty(long id, byte[] value) { getFirstSection().setProperty((int)id, value); }
void set1stProperty(long id, boolean value) { getFirstSection().setProperty((int)id, value); }
void set1stProperty(long id, int value) { getFirstSection().setProperty((int)id, value); }
void set1stProperty(long id, String value) { getFirstSection().setProperty((int)id, value); }
/** * Checks whether this {@link PropertySet} represents a Summary Information. * * @return {@code true} if this {@link PropertySet} * represents a Summary Information, else {@code false}. */ public boolean isSummaryInformation() { return !sections.isEmpty() && matchesSummary(getFirstSection().getFormatID(), SummaryInformation.FORMAT_ID); }
/** * Checks whether this {@link PropertySet} is a Document Summary Information. * * @return {@code true} if this {@link PropertySet} * represents a Document Summary Information, else {@code false}. */ public boolean isDocumentSummaryInformation() { return !sections.isEmpty() && matchesSummary(getFirstSection().getFormatID(), DocumentSummaryInformation.FORMAT_ID); }