- /**
- * Return the number of {@link TypeInfo} present in this {@link Data}.
- *
- * @return the number of {@link TypeInfo}s
- */
- public int size() {
- return types.size();
- }
-
- /**
- * Return the {@link TypeInfo} at index <i>index</i>.
- *
- * @param index
- * the index of the {@link TypeInfo} to find
- *
- * @return the {@link TypeInfo}
- *
- * @throws IndexOutOfBoundsException
- * if the index is < 0 or >= {@link Data#size()}
- */
- public TypeInfo get(int index) {
- return types.get(index);
- }
-
- /**
- * Add a new {@link TypeInfo} in this {@link Data}.
- *
- * @param type
- * the new type
- */
- public void add(TypeInfo type) {
- type.setParent(this);
- type.setDirty();
- types.add(type);
- }
-
- /**
- * Remove the given {@link TypeInfo} from its this {@link Data} if it is in.
- *
- * @return TRUE in case of success
- */
- public boolean remove(TypeInfo type) {
- if (types.remove(type)) {
- setDirty();
- }
-
- return false;
- }
-
- /**
- * Change the {@link TypeInfo}s of this {@link Data}.
- *
- * @param types
- * the new types
- */
- @Deprecated
- public void setTypes(List<TypeInfo> types) {
- // TODO: check if this method is required
- this.types.clear();
- for (TypeInfo type : types) {
- this.types.add(type);
- type.setParent(this);
- }
-
- setDirty();
- }
-