- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {OutputStreamWriter o =
OutputStream out;new OutputStreamWriter(out)
OutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
HttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
- Smart code suggestions by Codota
}
@Override public void writeDynData(ByteBuffer out) throws IOException { out.putFloat((float)0.) ; positions.clear(); this.src.getVisData().addAgentSnapshotInfo( positions); if (showParked) { out.putInt(positions.size()); for (AgentSnapshotInfo pos : positions) { writeAgent(pos, out); } } else { int valid = 0; for (AgentSnapshotInfo pos : positions) { if (pos.getAgentState() != AgentState.PERSON_AT_ACTIVITY) valid++; } out.putInt(valid); for (AgentSnapshotInfo pos : positions) { if (pos.getAgentState() != AgentState.PERSON_AT_ACTIVITY) writeAgent(pos, out); } } }
private void doSnapshot(final double time, VisMobsim visMobsim) { if (!this.snapshotWriters.isEmpty()) { Collection<AgentSnapshotInfo> positions = new ArrayList<AgentSnapshotInfo>(); for (VisLink link : visMobsim.getVisNetwork().getVisLinks().values()) { link.getVisData().addAgentSnapshotInfo(positions); } // We do not put non-network agents in movies. // Otherwise, we would add snapshots from visMobsim.getNonNetworkAgentSnapshots() here. for (SnapshotWriter writer : this.snapshotWriters) { writer.beginSnapshot(time); for (AgentSnapshotInfo position : positions) { writer.addAgent(position); } writer.endSnapshot(); } } }
Collection<AgentSnapshotInfo> positions = new LinkedList<AgentSnapshotInfo>(); for(VisLink qlink : simulationView.getVisNetwork().getVisLinks().values()) { qlink.getVisData().addAgentSnapshotInfo(positions);