Package it.polito.appeal.traci.protocol

Examples of it.polito.appeal.traci.protocol.StringList


    }

    @Override
    protected List<String> readValue(
        Command resp) throws TraCIException {
      return new StringList(resp.content(), true);
    }
View Full Code Here


    super(dis, dos, Constants.CMD_SET_VEHICLE_VARIABLE, objectID, Constants.VAR_ROUTE);
  }
 
  @Override
  protected void writeValueTo(List<Edge> newRoute, Storage content) {
    StringList edgeIDs = new StringList();
    for (Edge e : newRoute)
      edgeIDs.add(e.getID());
   
    edgeIDs.writeTo(content, true);
  }
View Full Code Here

  protected abstract C makeCollection();
 
  @Override
  protected C readValue(Command resp) throws TraCIException {
    Storage content = resp.content();
    List<String> ids = new StringList(content, true);
    C out = makeCollection();
    for (String id : ids) {
      try {
        out.add(repository.getByID(id));
      } catch (IOException e) {
View Full Code Here

  private final Lane acrossLane;
  private final Lane outgoingLane;

  ControlledLink(Storage content, Repository<Lane> laneRepo)
      throws IOException {
    StringList list = new StringList(content, true);
    Iterator<String> listIt = list.iterator();
    incomingLane = laneRepo.getByID(listIt.next());
    outgoingLane = laneRepo.getByID(listIt.next());
    acrossLane = laneRepo.getByID(listIt.next());
  }
View Full Code Here

    super(dis, dos, Constants.CMD_SET_VEHICLE_VARIABLE, objectID, Constants.VAR_ROUTE);
  }
 
  @Override
  protected void writeValueTo(List<Edge> newRoute, Storage content) {
    StringList edgeIDs = new StringList();
    for (Edge e : newRoute)
      edgeIDs.add(e.getID());
   
    edgeIDs.writeTo(content, true);
  }
View Full Code Here

  protected abstract C makeCollection();
 
  @Override
  protected C readValue(Command resp) throws TraCIException {
    Storage content = resp.content();
    List<String> ids = new StringList(content, true);
    C out = makeCollection();
    for (String id : ids) {
      try {
        out.add(repository.getByID(id));
      } catch (IOException e) {
View Full Code Here

  private final Lane acrossLane;
  private final Lane outgoingLane;

  ControlledLink(Storage content, Repository<Lane> laneRepo)
      throws IOException {
    StringList list = new StringList(content, true);
    Iterator<String> listIt = list.iterator();
    incomingLane = laneRepo.getByID(listIt.next());
    outgoingLane = laneRepo.getByID(listIt.next());
    acrossLane = laneRepo.getByID(listIt.next());
  }
View Full Code Here

    if (routes.getByID(id) != null)
      throw new IllegalArgumentException("route already exists");
   
    this.id = id;
   
    this.edges = new StringList();
    for (Edge edge : edges) {
      this.edges.add(edge.getID());
    }
  }
View Full Code Here

    }

    @Override
    protected List<String> readValue(
        Command resp) throws TraCIException {
      return new StringList(resp.content(), true);
    }
View Full Code Here

TOP

Related Classes of it.polito.appeal.traci.protocol.StringList

Copyright © 2018 www.massapicom. 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.