/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.sling.api.resource;

import java.util.Map;
import java.util.Collections;

import org.apache.sling.api.wrappers.ValueMapDecorator;

public interface ValueMap extends Map<String, Object> {

    /**
     * Empty value map
     */
    final ValueMap EMPTY = new ValueMapDecorator(Collections.<String, Object>emptyMap());
    
    // return named value converted to type T or
    // null if not existing
    <T> T get(String name, Class<T> type);

    // return named value converted to the type T of
    // the default value or the default value if the
    // named value does not exist
    <T> T get(String name, T defaultValue);
    
}

@@ -858,19 +858,27 @@
 va.util.
-Map
+Collections
 ;%0Aimport
@@ -888,27 +888,19 @@
 va.util.
-Collections
+Map
 ;%0A%0Aimpor
@@ -951,16 +951,296 @@
 rator;%0A%0A
+/**%0A * The %3Ccode%3EValueMap%3C/code%3E is an easy way to access%0A * properties of a resource. With most resources you can%0A * use %7B@link Resource#adaptTo(Class)%7D to adapt the resource%0A * to a value map. The various getter methods can be used%0A * to get the properties of the resource.%0A */%0A
 public i
@@ -1421,21 +1421,182 @@
 ));%0A
+%0A
     
+/**
 %0A    
-// r
+ * Get a named property and convert it into the given type.%0A     * @param name The name of the property%0A     * @param type The class of the type%0A     * @return R
 etur
@@ -1635,27 +1635,48 @@
 T or
-%0A    // null
+ %3Ccode%3Enull%3C/code%3E%0A     *        
  if no
-t
+n
  exi
@@ -1680,16 +1680,47 @@
 existing
+ or can't be converted.%0A     */
 %0A    %3CT%3E
@@ -1765,36 +1765,50 @@
    /
-/ return named value
+**%0A     * Get a named property and
  convert
 ed t
@@ -1807,114 +1807,254 @@
 vert
-ed 
+ it in
 to the 
-type T of%0A    // the default value or
+given type.%0A     * @param name The name of the property%0A     * @param type The class of
  the 
-default value if the%0A    // named value does not exist
+type%0A     * @return Return named value converted to type T or the%0A     *         default value if non existing or can't be converted.%0A     */
 %0A   
@@ -2098,11 +2098,6 @@
 e);%0A
-    %0A
 %7D%0A

Update javadocs.