com.google.android.apps.analytics.easytracking
Class ParameterLoaderImpl

java.lang.Object
  extended by com.google.android.apps.analytics.easytracking.ParameterLoaderImpl

public class ParameterLoaderImpl
extends Object

This class implements the ParameterLoader interface by loading parameters from the Application's resources.


Constructor Summary
ParameterLoaderImpl(android.content.Context ctx)
           
 
Method Summary
 boolean getBoolean(String key)
          Look up the boolean value represented by the string resource whose name is key.
 int getInt(String key, int defaultValue)
          Look up the integer value represented by the string resource whose name is key.
 String getString(String key)
          Look up the string value for the resource whose name is key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterLoaderImpl

public ParameterLoaderImpl(android.content.Context ctx)
Method Detail

getString

public String getString(String key)
Look up the string value for the resource whose name is key.

Parameters:
key - the key for the string resource we're seeking
Returns:
the string value, or null if not found

getBoolean

public boolean getBoolean(String key)
Look up the boolean value represented by the string resource whose name is key.

Parameters:
key - the key for the string resource we're seeking
Returns:
true if the key is found and is a string 'true'. Case is ignored.

getInt

public int getInt(String key,
                  int defaultValue)
Look up the integer value represented by the string resource whose name is key.

Parameters:
key - the key for the string resource we're seeking
defaultValue - the value to return if the key isn't found
Returns:
the int value found, or the defaultValue if the key wasn't found or couldn't be parsed into an int.


Copyright © 2012. All Rights Reserved.