249 * @see Sequence#getMicrosecondLength()
250 * @see #getByteLength
251 * @see #UNKNOWN_LENGTH
252 */
253 public long getMicrosecondLength() {
254 return microsecondLength;
255 }
256
257 /**
258 * Obtain an unmodifiable map of properties.
259 * The concept of properties is further explained in
260 * the {@link MidiFileFormat class description}.
261 *
262 * @return a <code>Map<String,Object></code> object containing
263 * all properties. If no properties are recognized, an empty map is
264 * returned.
265 *
266 * @see #getProperty(String)
267 * @since 1.5
268 */
269 public Map<String,Object> properties() {
270 Map<String,Object> ret;
271 if (properties == null) {
272 ret = new HashMap<String,Object>(0);
273 } else {
274 ret = (Map<String,Object>) (properties.clone());
275 }
276 return Collections.unmodifiableMap(ret);
277 }
278
279
280 /**
281 * Obtain the property value specified by the key.
282 * The concept of properties is further explained in
283 * the {@link MidiFileFormat class description}.
284 *
285 * <p>If the specified property is not defined for a
286 * particular file format, this method returns
287 * <code>null</code>.
288 *
|
249 * @see Sequence#getMicrosecondLength()
250 * @see #getByteLength
251 * @see #UNKNOWN_LENGTH
252 */
253 public long getMicrosecondLength() {
254 return microsecondLength;
255 }
256
257 /**
258 * Obtain an unmodifiable map of properties.
259 * The concept of properties is further explained in
260 * the {@link MidiFileFormat class description}.
261 *
262 * @return a <code>Map<String,Object></code> object containing
263 * all properties. If no properties are recognized, an empty map is
264 * returned.
265 *
266 * @see #getProperty(String)
267 * @since 1.5
268 */
269 @SuppressWarnings("unchecked") // Cast of result of clone
270 public Map<String,Object> properties() {
271 Map<String,Object> ret;
272 if (properties == null) {
273 ret = new HashMap<String,Object>(0);
274 } else {
275 ret = (Map<String,Object>) (properties.clone());
276 }
277 return Collections.unmodifiableMap(ret);
278 }
279
280
281 /**
282 * Obtain the property value specified by the key.
283 * The concept of properties is further explained in
284 * the {@link MidiFileFormat class description}.
285 *
286 * <p>If the specified property is not defined for a
287 * particular file format, this method returns
288 * <code>null</code>.
289 *
|