Back to project page Team7-301Project.
The source code is released under:
Apache License
If you think the Android project Team7-301Project listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ca.ualberta.cs.intent_singletons; /*from www.j a v a2s.com*/ import ca.ualberta.cs.models.Entry; /** * Use this singleton as a global access point to one Entry. This is useful for sending * information about one Entry between activities. * * @author bbruner */ public class EntrySingleton { private static final EntrySingleton entrySingleton = new EntrySingleton(); private Entry entry; private EntrySingleton() { super(); this.entry = null; } /** * Get an instance of the singleton. * @return EntrySingleton */ public static EntrySingleton getInstance() { return entrySingleton; } /** * Set the Entry of the singleton. * @param entry */ public void setEntry(Entry entry) { this.entry = entry; } /** * Get the singleton's Entry. * @return Entry Will return null if a call to setEntry has not been made yet. */ public Entry getEntry() { return this.entry; } }