org.base.apps.api.view.util
Class BaseInfo

java.lang.Object
  extended by org.base.apps.beans.BaseBean
      extended by org.base.apps.api.view.util.BaseInfo
All Implemented Interfaces:
Customizer, PropertyChangeListener, Serializable, EventListener, Map<CharSequence,String>, ApplicationInfo, PropertyChangeEmitter, Nameable, Named

public class BaseInfo
extends BaseBean
implements ApplicationInfo

Default implementation of ApplicationInfo.

Author:
Kevan Simpson
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
  BaseInfo(Application<D,C> app)
           
protected BaseInfo(Application<D,C> app, boolean isBroadcaster)
           
protected BaseInfo(BasePreferences prefs, boolean isBroadcaster)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set<Map.Entry<CharSequence,String>> entrySet()
           
 String get(Object key)
           
 ApplicationInfo getChild(CharSequence... steps)
           
 String getDescription()
           
 String getName()
          Fetches the name of this instance.
protected  BasePreferences getPreferences()
           
protected  String[] getPropertyKeys()
           
 String getTitle()
           
 Class<?> getType(CharSequence key)
           
 boolean isEmpty()
           
 Set<CharSequence> keySet()
           
 String offer(CharSequence key, String value)
          Will add the given info if and only if it does not exist in this object.
 String put(CharSequence key, String value)
           
 void putAll(Map<? extends CharSequence,? extends String> m)
           
 String remove(Object key)
           
 void setDescription(String desc)
           
 void setName(String name)
          Sets the name of this instance.
protected  void setPreferences(BasePreferences preferences)
           
 void setTitle(String title)
           
 int size()
           
 Collection<String> values()
           
 
Methods inherited from class org.base.apps.beans.BaseBean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, getSupport, isBroadcaster, log, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setBroadcaster, setObject, setSupport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 
Methods inherited from interface org.base.apps.beans.events.PropertyChangeEmitter
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface java.beans.Customizer
setObject
 

Constructor Detail

BaseInfo

public BaseInfo(Application<D,C> app)

BaseInfo

protected BaseInfo(Application<D,C> app,
                   boolean isBroadcaster)
Parameters:
isBroadcaster -

BaseInfo

protected BaseInfo(BasePreferences prefs,
                   boolean isBroadcaster)
Method Detail

getChild

public ApplicationInfo getChild(CharSequence... steps)
Specified by:
getChild in interface ApplicationInfo
See Also:
ApplicationInfo.getChild(java.lang.CharSequence[])

setName

public void setName(String name)
Description copied from interface: Nameable
Sets the name of this instance.

Specified by:
setName in interface Nameable
Parameters:
name - The new name.
See Also:
Nameable.setName(java.lang.String)

getName

public String getName()
Description copied from interface: Named
Fetches the name of this instance.

Specified by:
getName in interface Named
Returns:
the name of this instance.
See Also:
Named.getName()

getDescription

public String getDescription()
Specified by:
getDescription in interface ApplicationInfo
See Also:
ApplicationInfo.getDescription()

getTitle

public String getTitle()
Specified by:
getTitle in interface ApplicationInfo
See Also:
ApplicationInfo.getTitle()

setDescription

public void setDescription(String desc)
Specified by:
setDescription in interface ApplicationInfo
See Also:
ApplicationInfo.setDescription(java.lang.String)

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface ApplicationInfo
See Also:
ApplicationInfo.setTitle(java.lang.String)

getType

public Class<?> getType(CharSequence key)
Specified by:
getType in interface ApplicationInfo
See Also:
ApplicationInfo.getType(java.lang.CharSequence)

offer

public String offer(CharSequence key,
                    String value)
Description copied from interface: ApplicationInfo
Will add the given info if and only if it does not exist in this object.

Specified by:
offer in interface ApplicationInfo
Parameters:
key - The given info's key.
value - The given info's value.
Returns:
The value of the info, regardless of whether it existed.
See Also:
ApplicationInfo.offer(java.lang.CharSequence, java.lang.String)

size

public int size()
Specified by:
size in interface Map<CharSequence,String>
See Also:
Map.size()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<CharSequence,String>
See Also:
Map.isEmpty()

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<CharSequence,String>
See Also:
Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<CharSequence,String>
See Also:
Map.containsValue(java.lang.Object)

get

public String get(Object key)
Specified by:
get in interface Map<CharSequence,String>
See Also:
Map.get(java.lang.Object)

put

public String put(CharSequence key,
                  String value)
Specified by:
put in interface Map<CharSequence,String>
See Also:
Map.put(java.lang.Object, java.lang.Object)

remove

public String remove(Object key)
Specified by:
remove in interface Map<CharSequence,String>
See Also:
Map.remove(java.lang.Object)

putAll

public void putAll(Map<? extends CharSequence,? extends String> m)
Specified by:
putAll in interface Map<CharSequence,String>
See Also:
Map.putAll(java.util.Map)

clear

public void clear()
Specified by:
clear in interface Map<CharSequence,String>
See Also:
Map.clear()

keySet

public Set<CharSequence> keySet()
Specified by:
keySet in interface Map<CharSequence,String>
See Also:
Map.keySet()

values

public Collection<String> values()
Specified by:
values in interface Map<CharSequence,String>
See Also:
Map.values()

entrySet

public Set<Map.Entry<CharSequence,String>> entrySet()
Specified by:
entrySet in interface Map<CharSequence,String>
See Also:
Map.entrySet()

getPropertyKeys

protected String[] getPropertyKeys()

getPreferences

protected BasePreferences getPreferences()
Returns:
the preferences

setPreferences

protected void setPreferences(BasePreferences preferences)
Parameters:
preferences - the preferences to set

Please visit Base Apps, hosted on Sourceforge.net.

Copyright 2011, Blue Agate Software Entity (BASE)