blob: e8d091d7e4e10a9d126874fdb4d0ee655b5c478f [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.api;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class MethodUse extends MethodAPI
{
private List lines;
/**
* @return Returns the line.
*/
public Collection 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;
}
}