📄 nodeobject.java
字号:
package edu.uiuc.cs.cs327.linuxwifi.services;
import java.awt.*;
import net.jxta.protocol.PeerAdvertisement;
/**
* Object that is returned for each element of the knownNodesVector
* and is also maintained for each node that is accessed for uploads
* and downloads.
*/
public class NodeObject {
String nodeName;
String nodeID;
PeerAdvertisement peerAdv;
/**
* Constructs a NodeObject class for the associated node
* @param aUserName username associated with this node
* @param aIPAddress is the ip address associated with this node
* @param aNodeName is the name associated with this node
*/
public NodeObject(PeerAdvertisement pa) {
nodeName = pa.getName();
nodeID= pa.getID().toString();
peerAdv = pa;
}
/**
* Gets the user name
* @return a string referring to the associated username
*/
public String getNodeName()
{
return(nodeName);
}
/**
* Gets the ip address
* @return a string referring to the associated ip address
*/
public String getNodeID()
{
return(nodeID);
}
public PeerAdvertisement getPeerAdvertisement(){
return(peerAdv);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -