Преглед изворни кода

Improves Javadoc Comments for the new classes

Andreas T. Meyer-Berg пре 5 година
родитељ
комит
1fa2aa286b

+ 2 - 2
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/Connection.java

@@ -118,18 +118,18 @@ public interface Connection {
 
 	/**
 	 * Returns the current transmission status of the connection.
+	 * (FINISHED, ACTIVE, TERMINATED, HALTED)
 	 * 
 	 * @return transmission status
-	 * @see FINISHED, ACTIVE, TERMINATED and HALTED
 	 */
 	public byte getStatus();
 
 	/**
 	 * Set the transmission status of the connection
+	 * to FINISHED, ACTIVE, TERMINATED or HALTED
 	 * 
 	 * @param status
 	 *            transmission status
-	 * @see FINISHED, ACTIVE, TERMINATED and HALTED
 	 */
 	public void setStatus(byte status);
 	

+ 2 - 2
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/Link.java

@@ -43,7 +43,7 @@ public interface Link {
 	public Collection<Connection> getConnections();
 
 	/**
-	 * @param coonnection
+	 * @param connection
 	 *            the connection to add
 	 */
 	public void addConnection(Connection connection);
@@ -52,7 +52,7 @@ public interface Link {
 	 * @param connection
 	 *            the connection to remove
 	 */
-	public void removeConnection(Connection Connection);
+	public void removeConnection(Connection connection);
 
 	/**
 	 * Simulates an interval starting at startTime for a given duration

+ 4 - 0
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/Packet.java

@@ -26,12 +26,14 @@ public abstract class Packet {
 	public abstract byte[] dumpBytes();
 
 	/**
+	 * Returns a textual representation of the package
 	 * 
 	 * @return Textual Representation of the Package
 	 */
 	public abstract String getTextualRepresentation();
 
 	/**
+	 * Returns the Payload as String
 	 * 
 	 * @return Textual Representation of the Package
 	 */
@@ -39,6 +41,8 @@ public abstract class Packet {
 
 	/**
 	 * Returns the Timestamp, at which the packet was sent
+	 * 
+	 * @return timestamp, the packet was sent
 	 */
 	public long getTimestamp(){
 		return timestamp;

+ 2 - 2
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/Port.java

@@ -62,8 +62,8 @@ public class Port {
 
 	/**
 	 * Creates a new Port for the given Device with the specified PortNumber
-	 * @param device
-	 * @param portNumber
+	 * @param device SmartDevice this port listens on
+	 * @param portNumber Number of the Port
 	 */
 	public Port(SmartDevice device, short portNumber){
 		status = CLOSED;

+ 2 - 2
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/SmartDevice.java

@@ -213,14 +213,14 @@ public class SmartDevice {
 	}
 
 	/**
-	 * @param ports the ports to set
+	 * @param port the port to add
 	 */
 	public void addPort(Port port) {
 		this.ports.add(port);
 	}
 	
 	/**
-	 * @param ports the ports to set
+	 * @param port the ports to remove
 	 */
 	public void removePort(Port port) {
 		this.ports.remove(port);