added remove destination method
This commit is contained in:
parent
880b3df797
commit
e4611dc912
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: RadioConnection.java,v 1.1 2006/08/21 12:12:55 fros4943 Exp $
|
* $Id: RadioConnection.java,v 1.2 2006/10/06 13:31:02 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja;
|
package se.sics.cooja;
|
||||||
|
@ -84,6 +84,20 @@ public class RadioConnection {
|
||||||
destinationPositions.add(position);
|
destinationPositions.add(position);
|
||||||
destinationData.add(data);
|
destinationData.add(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a connection destination.
|
||||||
|
*
|
||||||
|
* @param radio Destination to remove
|
||||||
|
*/
|
||||||
|
public void removeDestination(Radio radio) {
|
||||||
|
int pos = destinationRadios.indexOf(radio);
|
||||||
|
if (pos > 0) {
|
||||||
|
destinationRadios.remove(pos);
|
||||||
|
destinationPositions.remove(pos);
|
||||||
|
destinationData.remove(pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Source radio
|
* @return Source radio
|
||||||
|
|
Loading…
Reference in a new issue