All Downloads are FREE. Search and download functionalities are using the official Maven repository.

prompto.grammar.MethodDeclarationList Maven / Gradle / Ivy

The newest version!
package prompto.grammar;

import java.util.LinkedList;
import java.util.Objects;

import prompto.declaration.IMethodDeclaration;
import prompto.parser.ICodeSection;
import prompto.parser.ISection;

public class MethodDeclarationList extends LinkedList {

	private static final long serialVersionUID = 1L;

	public MethodDeclarationList() {
	}

	public MethodDeclarationList(IMethodDeclaration method) {
		this.add(method);
	}

	public ICodeSection locateCodeSection(ISection section) {
		return this.stream()
				.map(m->m.locateCodeSection(section))
				.filter(Objects::nonNull)
				.findFirst()
				.orElse(null);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy