Code example for Stack

Methods: add

0
		} 
		return amTool;
	} 
 
	public boolean addActivity(Activity activity) {
		return activityStack.add(activity);
	} 
 
	public Activity currentActivity() {
		return activityStack.lastElement();
	} 
 
	public int getActivityStackNum() { 
		return activityStack.size();
	} 
 
	public void removeNewActivity() { 
		Activity localActivity = activityStack.lastElement();
		if (localActivity != null)
			localActivity.finish();
	}