jdk/src/share/classes/javax/sound/sampled/AudioFormat.java
changeset 25131 49006bd0e69d
parent 25128 2dfdfa369071
equal deleted inserted replaced
25130:adfaa02ea516 25131:49006bd0e69d
   386      * @return a {@code Map<String, Object>} object containing all properties.
   386      * @return a {@code Map<String, Object>} object containing all properties.
   387      *         If no properties are recognized, an empty map is returned.
   387      *         If no properties are recognized, an empty map is returned.
   388      * @see #getProperty(String)
   388      * @see #getProperty(String)
   389      * @since 1.5
   389      * @since 1.5
   390      */
   390      */
       
   391     @SuppressWarnings("unchecked") // Cast of result of clone.
   391     public Map<String,Object> properties() {
   392     public Map<String,Object> properties() {
   392         Map<String,Object> ret;
   393         Map<String,Object> ret;
   393         if (properties == null) {
   394         if (properties == null) {
   394             ret = new HashMap<String,Object>(0);
   395             ret = new HashMap<>(0);
   395         } else {
   396         } else {
   396             ret = (Map<String,Object>) (properties.clone());
   397             ret = (Map<String,Object>) (properties.clone());
   397         }
   398         }
   398         return Collections.unmodifiableMap(ret);
   399         return Collections.unmodifiableMap(ret);
   399     }
   400     }