TV-Browser 3.4 API

util.misc
Class PropertyDefaults

java.lang.Object
  extended by util.misc.PropertyDefaults

public class PropertyDefaults
extends java.lang.Object

A class that stores a HashMap with default values for Properties

Since:
3.3.4
Author:
René Mach

Constructor Summary
PropertyDefaults(java.util.HashMap<java.lang.String,java.lang.String> defaultValueMap)
           
 
Method Summary
 java.lang.String getDefaultValueForKey(java.lang.String key)
          Gets the default value of this property defaults for the given key.
 java.lang.String getValueFromProperties(java.lang.String key, java.util.Properties properties)
          Gets the value for the given key from the given properties or the default value for the key of this property defaults.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyDefaults

public PropertyDefaults(java.util.HashMap<java.lang.String,java.lang.String> defaultValueMap)
Method Detail

getValueFromProperties

public java.lang.String getValueFromProperties(java.lang.String key,
                                               java.util.Properties properties)
Gets the value for the given key from the given properties or the default value for the key of this property defaults.

Parameters:
key - The key of the property value to get.
properties - The properties to get the value from
Returns:
A value or null if no value exists for the given key.

getDefaultValueForKey

public java.lang.String getDefaultValueForKey(java.lang.String key)
Gets the default value of this property defaults for the given key.

Parameters:
key - The key of the property value default to get.
Returns:
The default value or null if no default value exists for the given key.

TV-Browser 3.4 API

TV-Browser 3.4, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)