blob: 54632752d5cf1e166844d77813a6b22b6a4ca45d [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.wtp.releng.tools.component.use;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.eclipse.wtp.releng.tools.component.api.FieldAPI;
public class FieldUse extends FieldAPI
{
private List lines;
/**
* @return Returns the line.
*/
public List getLines()
{
if (lines == null)
return new ArrayList(0);
else
return new ArrayList(lines);
}
public void addLine(int line)
{
if (lines == null)
lines = new ArrayList(1);
lines.add(String.valueOf(line));
}
public void addLines(Collection l)
{
if (lines == null)
lines = new ArrayList(l);
else
lines.addAll(l);
}
public int sizeLines()
{
return lines != null ? lines.size() : 0;
}
}