Examples of InformationParametersHash


Examples of org.timerescue.information.InformationParametersHash

   */
  private InformationParameters getSorroundings(
      Coordinate center,
      int distance_sense) {
    // TODO Optimization for this
    InformationParameters information_paramaters = new InformationParametersHash();
    List<Serializable> data_elements = new ArrayList<Serializable>();
    //Sent all closer Elements in the map
    for (Iterator<Element> iterator = elements.iterator(); iterator.hasNext();) {
      Element element =  iterator.next();
     
      if (center.isClose(element.getCoordinate(), distance_sense)){
        //information_paramaters.addParamData(Constants.SURROUND_PROPERTY, element);
       
      }
    }
    //Sent all closer Agents in the map
    for (Iterator<Agent> iterator = agents.iterator(); iterator.hasNext();) {
      Agent agent =  iterator.next();
     
      if (center.isClose(agent.getCoordinate(), distance_sense)){
        information_paramaters.addParamData(Constants.SURROUND_PROPERTY, agent);
      }
    }
    //Add the array to the parameters object
    information_paramaters.addArrayParamData(
        Constants.SURROUND_PROPERTY,
        data_elements);
    return information_paramaters;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.