01: /*******************************************************************************
02: * Copyright (c) 2002, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.cheatsheets.data;
11:
12: import java.util.ArrayList;
13:
14: public class RepeatedSubItem extends AbstractSubItem implements
15: ISubItemItem {
16: private String values;
17: private ArrayList subItems;
18:
19: /**
20: * Constructor for RepeatedSubItem.
21: */
22: public RepeatedSubItem() {
23: super ();
24: }
25:
26: public RepeatedSubItem(String values) {
27: super ();
28: this .values = values;
29: }
30:
31: /**
32: * Returns the values.
33: * @return String
34: */
35: public String getValues() {
36: return values;
37: }
38:
39: /**
40: * Sets the values.
41: * @param newValues The new values to set
42: */
43: public void setValues(String newValues) {
44: this .values = newValues;
45: }
46:
47: /**
48: * @param subItem the SubItem to add.
49: */
50: public void addSubItem(AbstractSubItem subItem) {
51: if (subItems == null) {
52: subItems = new ArrayList();
53: }
54: subItems.add(subItem);
55: }
56:
57: /**
58: * Returns a list which will always only contain at most 1 entry.
59: * @return Returns the subItems.
60: */
61: public ArrayList getSubItems() {
62: return subItems;
63: }
64: }
|