/** * Copy constructor. * @param other * the <code>PDU</code> to copy from. */ public PDU(PDU other) { variableBindings = (Vector) other.variableBindings.clone(); errorIndex = (Integer32) other.errorIndex.clone(); errorStatus = (Integer32) other.errorStatus.clone(); type = other.type; if (other.requestID != null) { requestID = (Integer32) other.requestID.clone(); } }
/** * Copy constructor which creates a deep copy (clone) of the * other PDU. * * @param other the {@code PDU} to copy from. */ public PDU(PDU other) { variableBindings = new ArrayList<>(other.size()); for (VariableBinding vb : other.variableBindings) { variableBindings.add((VariableBinding) vb.clone()); } errorIndex = (Integer32) other.errorIndex.clone(); errorStatus = (Integer32) other.errorStatus.clone(); type = other.type; if (other.requestID != null) { requestID = (Integer32) other.requestID.clone(); } }
/** * Copy constructor which creates a deep copy (clone) of the * other PDU. * @param other * the {@code PDU} to copy from. */ public PDU(PDU other) { variableBindings = new Vector<VariableBinding>(other.size()); for (VariableBinding vb : other.variableBindings) { variableBindings.add((VariableBinding) vb.clone()); } errorIndex = (Integer32) other.errorIndex.clone(); errorStatus = (Integer32) other.errorStatus.clone(); type = other.type; if (other.requestID != null) { requestID = (Integer32) other.requestID.clone(); } }
/** * Copy constructor. * @param other * the <code>PDUv1</code> to copy from. * @since 1.9.1c */ public PDUv1(PDUv1 other) { super(other); enterprise = (OID) other.enterprise.clone(); agentAddress = (IpAddress) other.agentAddress.clone(); genericTrap = (Integer32) other.genericTrap.clone(); specificTrap = (Integer32) other.specificTrap.clone(); timestamp = (TimeTicks) other.timestamp.clone(); }
/** * Copy constructor. * @param other * the {@code PDUv1} to copy from. * @since 1.9.1c */ public PDUv1(PDUv1 other) { super(other); enterprise = (OID) other.enterprise.clone(); agentAddress = (IpAddress) other.agentAddress.clone(); genericTrap = (Integer32) other.genericTrap.clone(); specificTrap = (Integer32) other.specificTrap.clone(); timestamp = (TimeTicks) other.timestamp.clone(); }
/** * Copy constructor. * @param other * the {@code PDUv1} to copy from. * @since 1.9.1c */ public PDUv1(PDUv1 other) { super(other); enterprise = (OID) other.enterprise.clone(); agentAddress = (IpAddress) other.agentAddress.clone(); genericTrap = (Integer32) other.genericTrap.clone(); specificTrap = (Integer32) other.specificTrap.clone(); timestamp = (TimeTicks) other.timestamp.clone(); }
public Integer32 getValue() { if (snmpCommunityMIB != null) { if (snmpCommunityMIB.isSourceAddressFiltering()) { setValue(new Integer32(Snmp4jCfgSecSrcAddrValidationEnum.enabled)); } else { setValue(new Integer32(Snmp4jCfgSecSrcAddrValidationEnum.disabled)); } } else { setValue(new Integer32(Snmp4jCfgSecSrcAddrValidationEnum.notAvailable)); } return (Integer32) super.getValue().clone(); }