|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frontend.LinkedFENodeList
This class will link together each nodes which is represented using the FENode class. The FENode class acts as the storing medium for the frontEnd ADT, while this class actus as the operational tool for the frontEnd to interact with it's ADT.
Constructor Summary | |
LinkedFENodeList()
This will create an empty list. |
Method Summary | |
boolean |
add(String sInputIP,
LanNode inputLanNode,
JLabel inputLabel,
int updateStatus,
String hostName)
This method will take in as it's arguments the essential data needed to create a new link in this linked structure. |
int |
compare(int[] insertingIP,
int[] comparingIP)
This method will compare two IP addresses. |
LinkedList |
delete(String sInputIP)
This method will delete a node from this linked list structure. |
LinkedList |
getAllLabels()
This method will simply extract all the JLabels for each node in the list. |
FENode |
getAllNodes()
This method will return the first FENode (ie the header) for this list. |
String[] |
getAllStringIPs()
This method will return all the IP addresses, in string format for all the node in this list. |
FENode |
getFENode(JLabel inputLabel)
This method will simply return the corresponding FENode for the given input. |
FENode |
getFENode(LanNode inputLanNode)
This method will simply return the corresponding FENode for the given input. |
FENode |
getFENode(String sInputIP)
This method will simply return the corresponding FENode for the given input. |
int |
getNodePosition(String sInputIP)
This method is used for obtaining the position of a node in this linked structure. |
int |
size()
This method will return the size of this list. |
int[] |
StringToIntIp(String sInputIP)
This method will take in a 32-bit IP address represented in String format, and convert each of the 8-bit integers so they may be placed in an int array. |
void |
updateLastUpdateForNode(JLabel inputLabel,
int inNewUpdate)
This method will update the last update status for a particular node. |
void |
updateLastUpdateForNode(String inputIP,
int inNewUpdate)
This method will update the last update status for a particular node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LinkedFENodeList()
Method Detail |
public boolean add(String sInputIP, LanNode inputLanNode, JLabel inputLabel, int updateStatus, String hostName)
sInputIP
- is the value of the IP in String format
of a node to be addedinputLanNode
- is the correponding LanNode object
for this particular nodeinputLabel
- is the corresponding JLabel in which
the frontEnd will use to convey a graphical representation
of the status of this particular nodeupdateStatus
- is the current status of the node. See
FENode.getLastUpdateStatus()
for more detailshostName
- is the value derived from the DNS value for
this particular node
public LinkedList getAllLabels()
public FENode getAllNodes()
public LinkedList delete(String sInputIP)
sInputIP
- the string IP value of the node
to be deleted.
public FENode getFENode(String sInputIP)
sInputIP
- the string value IP of the node
to be found
public FENode getFENode(JLabel inputLabel)
inputLabel
- the JLabel of the node to be
returned
public FENode getFENode(LanNode inputLanNode)
inputLanNode
- the LanNode of the node to be
found.
public int getNodePosition(String sInputIP)
sInputIP
- the string value of the IP address
in which one is searching for.
public String[] getAllStringIPs()
public int size()
public int compare(int[] insertingIP, int[] comparingIP)
if insertingIP contained the values 1,2,3,4 and comparingIP contained the value 1,2,4,4; then the return value would indicate that comparingIP is larger than insertingIP. The reasoning, insertingIP[2] = 3 < comparingIP[2] = 4.
insertingIP
- this is the first int array, representing
a 32-bit IP addresscomparingIP
- this is the second int array, representing
a 32-bit IP address
public int[] StringToIntIp(String sInputIP)
Input is 1.2.3.4 in String format. The return value will be an int array with the following:
sInputIP
- is the String value representing a 32-bit
IP address.
public void updateLastUpdateForNode(String inputIP, int inNewUpdate)
inputIP
- represents the node which is to be updatedinNewUpdate
- is the update status for the node. See
FENode.getLastUpdateStatus()
for more details.public void updateLastUpdateForNode(JLabel inputLabel, int inNewUpdate)
inputLabel
- represents the node which is being updated.inNewUpdate
- is the update status for the node. See
FENode.getLastUpdateStatus()
for more details.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |