Fix stuff, implement missing toString()

This commit is contained in:
Jan Philipp Timme 2016-12-15 10:27:28 +01:00
parent 52a46555f7
commit 516e34c6a0
Signed by untrusted user: JPT
GPG Key ID: 5F2C85EC6F3754B7
2 changed files with 18 additions and 3 deletions

View File

@ -136,8 +136,9 @@ public class CommandLineInterface {
} }
private void help() { private void help() {
HelpFormatter formater = new HelpFormatter(); HelpFormatter formatter = new HelpFormatter();
formater.printHelp(" ", options); formatter.setWidth(120);
formatter.printHelp(" ", options);
} }
public void run() { public void run() {

View File

@ -4,7 +4,6 @@ import org.pcap4j.packet.EthernetPacket;
import com.orientechnologies.orient.core.metadata.schema.OType; import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument; import com.orientechnologies.orient.core.record.impl.ODocument;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx; import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx;
import com.tinkerpop.blueprints.impls.orient.OrientVertexType; import com.tinkerpop.blueprints.impls.orient.OrientVertexType;
@ -73,5 +72,20 @@ public class EthernetFrameModel implements Model {
return arguments; return arguments;
} }
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("EthernetFrame[");
sb.append(this.timestamp);
sb.append(".");
sb.append(this.microseconds);
sb.append("] ");
sb.append(this.sourceMac);
sb.append(" -> ");
sb.append(this.targetMac);
sb.append(" (");
sb.append(this.size);
sb.append(" bytes) ");
return sb.toString();
}
} }