/************************************************************************************ * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University * All rights reserved. * Refer to LICENSE for terms and conditions of use. ***********************************************************************************/ package vnsim.applications.vitp.utils; import vnsim.vehicular.simulator.Location; public class Neighbor { private Location location; public int id; public long timestamp; //the timestamp when the neighbor //was detected public Location getLocation(){ return location; } // public Neighbor(Location loc) { // this.location=loc; // } public Neighbor(Location loc, int id){ this.location=loc; this.id=id; } public Neighbor(Location loc, int id, long timestamp) { this(loc,id); this.timestamp=timestamp; } public String toString() { String ret=""; ret=ret+"N:[id="+id+"Rd="+location.roadIdx+";Pt="+location.ptIdx+"]-"; return ret; } public long getTimestamp() { return timestamp; } }