View Javadoc

1   package nl.tudelft.goal.ut3.selector;
2   
3   import java.util.Collection;
4   
5   import cz.cuni.amis.pogamut.base3d.worldview.object.ILocated;
6   import cz.cuni.amis.utils.NullCheck;
7   
8   /**
9    * Selects a location given before hand.
10   * 
11   * @author mpkorstanje
12   * 
13   */
14  public class ALocation extends ContextSelector {
15  
16  	private ILocated location;
17  
18  	public ALocation(ILocated location) {
19  		NullCheck.check(location, "location");
20  		this.location = location;
21  	}
22  
23  	@Override
24  	public ILocated select(Collection<? extends ILocated> targets) {
25  		return location;
26  	}
27  
28  	/*
29  	 * (non-Javadoc)
30  	 * 
31  	 * @see java.lang.Object#toString()
32  	 */
33  	@Override
34  	public String toString() {
35  		return "ALocation [location=" + location + "]";
36  	}
37  
38  }