[New] added missing abstract class StrolchTypeNavigator
This commit is contained in:
parent
c0cebd533a
commit
4f428afcd1
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright (c) 2012, Robert von Burg
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This file is part of the XXX.
|
||||
*
|
||||
* XXX is free software: you can redistribute
|
||||
* it and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* XXX is distributed in the hope that it will
|
||||
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with XXX. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package li.strolch.runtime.query.inmemory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import li.strolch.model.StrolchElement;
|
||||
import li.strolch.runtime.agent.ElementMap;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*
|
||||
*/
|
||||
public abstract class StrolchTypeNavigator<T extends StrolchElement> implements Navigator<T> {
|
||||
|
||||
private String type;
|
||||
|
||||
public StrolchTypeNavigator(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public List<T> navigate() {
|
||||
return getElementMap().getElementsBy(this.type);
|
||||
}
|
||||
|
||||
protected abstract ElementMap<T> getElementMap();
|
||||
}
|
Loading…
Reference in New Issue