@Test public void copyTest() { PcapPktHdr pktHdr = new PcapPktHdr(50, 60, 1000, 2000L); assert pktHdr.equals(pktHdr.copy()); }
public PcapPktHdr copy() { PcapPktHdr pktHdr = new PcapPktHdr(); pktHdr.caplen = this.caplen; pktHdr.len = this.len; pktHdr.tv_sec = this.tv_sec; pktHdr.tv_usec = this.tv_usec; return pktHdr; }
PcapPktHdr implements Cloneable { public PcapPktHdr copy() { PcapPktHdr pktHdr = new PcapPktHdr(); pktHdr.caplen = this.caplen; pktHdr.len = this.len; pktHdr.tv_sec = this.tv_sec; pktHdr.tv_usec = this.tv_usec; return pktHdr; } }
PcapPktHdr implements Cloneable { public PcapPktHdr copy() { PcapPktHdr pktHdr = new PcapPktHdr(); pktHdr.caplen = this.caplen; pktHdr.len = this.len; pktHdr.tv_sec = this.tv_sec; pktHdr.tv_usec = this.tv_usec; return pktHdr; } PcapPktHdr();  PcapPktHdr(final int caplen, final int len, final int tvSec, final long tvUsec); }
PcapPktHdr implements Cloneable { public PcapPktHdr copy() { PcapPktHdr pktHdr = new PcapPktHdr(); pktHdr.caplen = this.caplen; pktHdr.len = this.len; pktHdr.tv_sec = this.tv_sec; pktHdr.tv_usec = this.tv_usec; return pktHdr; } PcapPktHdr();  PcapPktHdr(final int caplen, final int len, final int tvSec, final long tvUsec); static PcapPktHdr newInstance(final int caplen, final int len, final int tvSec, final long tvUsec); int getCapLen(); int getLen(); int getTvSec(); long getTvUsec(); @Override boolean equals(final Object o); @Override int hashCode(); @Override PcapPktHdr clone(); PcapPktHdr copy(); @Override String toString(); }
PcapPktHdr implements Cloneable { public PcapPktHdr copy() { PcapPktHdr pktHdr = new PcapPktHdr(); pktHdr.caplen = this.caplen; pktHdr.len = this.len; pktHdr.tv_sec = this.tv_sec; pktHdr.tv_usec = this.tv_usec; return pktHdr; } PcapPktHdr();  PcapPktHdr(final int caplen, final int len, final int tvSec, final long tvUsec); static PcapPktHdr newInstance(final int caplen, final int len, final int tvSec, final long tvUsec); int getCapLen(); int getLen(); int getTvSec(); long getTvUsec(); @Override boolean equals(final Object o); @Override int hashCode(); @Override PcapPktHdr clone(); PcapPktHdr copy(); @Override String toString();  }