Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * 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.wicket.util.value;
 
 import java.util.Map;
 
A Map interface that holds values, parses Strings, and exposes a variety of convenience methods.

Author(s):
Johan Compagner
Since:
1.2.6
 
 public interface IValueMap extends Map
 {
 
 	void clear();

Retrieves a boolean value by key.

Parameters:
key the key
Returns:
the value
Throws:
org.apache.wicket.util.string.StringValueConversionException
 
 	boolean getBoolean(final String keythrows StringValueConversionException;

Retrieves a double value by key.

Parameters:
key the key
Returns:
the value
Throws:
org.apache.wicket.util.string.StringValueConversionException
 
 	double getDouble(final String keythrows StringValueConversionException;

Retrieves a double value by key, using a default value if not found.

Parameters:
key the key
defaultValue value to use if no value is in this IValueMap
Returns:
the value
Throws:
org.apache.wicket.util.string.StringValueConversionException
 
 	double getDouble(final String keyfinal double defaultValue)
Retrieves a Duration by key.

Parameters:
key the key
Returns:
the Duration value
Throws:
org.apache.wicket.util.string.StringValueConversionException
 
Retrieves an int value by key.

Parameters:
key the key
Returns:
the value
Throws:
org.apache.wicket.util.string.StringValueConversionException
 
 	int getInt(final String keythrows StringValueConversionException;

Retrieves an int value by key, using a default value if not found.

Parameters:
key the key
defaultValue value to use if no value is in this IValueMap
Returns:
the value
Throws:
org.apache.wicket.util.string.StringValueConversionException
	int getInt(final String keyfinal int defaultValuethrows StringValueConversionException;

Retrieves a long value by key.

Parameters:
key the key
Returns:
the value
Throws:
org.apache.wicket.util.string.StringValueConversionException
	long getLong(final String keythrows StringValueConversionException;

Retrieves a long value by key, using a default value if not found.

Parameters:
key the key
defaultValue value to use if no value in this IValueMap
Returns:
the value
Throws:
org.apache.wicket.util.string.StringValueConversionException
	long getLong(final String keyfinal long defaultValuethrows StringValueConversionException;

Retrieves a String by key, using a default value if not found.

Parameters:
key the key
defaultValue default value to return if value is null
Returns:
the String
	String getString(final String keyfinal String defaultValue);

Retrieves a String by key.

Parameters:
key the key
Returns:
the String
	String getString(final String key);

Retrieves a CharSequence by key.

Parameters:
key the key
Returns:
the CharSequence
Retrieves a String array by key. If the value was a String[] it will be returned directly. If it was a String it will be converted to a String array of length one. If it was an array of another type, a String array will be made and each element will be converted to a String.

Parameters:
key the key
Returns:
the String array of that key
	String[] getStringArray(final String key);

Retrieves a StringValue object by key.

Parameters:
key the key
Returns:
the StringValue object
Retrieves a Time object by key.

Parameters:
key the key
Returns:
the Time object
Throws:
org.apache.wicket.util.string.StringValueConversionException
Returns whether or not this IValueMap is immutable.

Returns:
whether or not this IValueMap is immutable
	boolean isImmutable();

Makes this IValueMap immutable by changing the underlying map representation to a Collections.unmodifiableMap. After calling this method, any attempt to modify this IValueMap will result in a RuntimeException being thrown by the Collections framework.

Returns:
this IValueMap
	Object put(final Object keyfinal Object value);

	void putAll(final Map map);

	Object remove(final Object key);

Provided that the hash key is a String and you need to access the value ignoring the key's case (upper- or lowercase letters), then you may use this method to get the correct writing.

Parameters:
key the key
Returns:
the key with the correct writing
	String getKey(final String key);
New to GrepCode? Check out our FAQ X