Capabilitiespublic final class Capabilities extends Object
Fields Summary |
---|
private final HashMap | mItems | public static final String | OFFLINE_KEY |
Constructors Summary |
---|
public Capabilities()
mItems = new HashMap<String,Object>();
| public Capabilities(Object[] pairs)
this();
for( int i = 0; i < pairs.length; i +=2 )
{
add( (String)pairs[ i ], pairs[ i + 1] );
}
|
Methods Summary |
---|
public void | add(java.lang.String key, java.lang.Object value)
assert( ! mItems.containsKey( key ) );
mItems.put( key, value );
| public java.util.Map | getAll()
return Collections.unmodifiableMap( mItems );
| public boolean | getOfflineCapable()
return "true".equals( "" + mItems.get( OFFLINE_KEY ) );
| public void | setOfflineCapable(boolean value)
add( OFFLINE_KEY, "" + value );
|
|