public boolean equals(Object obj) { if (obj instanceof MOInfo) { MOInfo o = (MOInfo)obj; return o.oid.equals(oid) && ((version == null) || (o.version == null) || version.equals(o.version)); } return false; }
public boolean equals(Object obj) { if (obj instanceof MOInfo) { MOInfo o = (MOInfo)obj; return o.oid.equals(oid) && ((version == null) || (o.version == null) || version.equals(o.version)); } return false; }
public Row getRow(OID index) { for (ListIterator it = rowCache.listIterator(rowCache.size() + 1); it.hasPrevious(); ) { Row r = (Row) it.previous(); if (index.equals(r.getRowIndex())) { return r; } } return null; } }
public Row getRow(OID index) { for (ListIterator<Row> it = rowCache.listIterator(rowCache.size() + 1); it.hasPrevious(); ) { Row r = it.previous(); if (index.equals(r.getRowIndex())) { return r; } } return null; } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!this.getClass().isInstance(obj)) { return false; } OidWithContext other = (OidWithContext)obj; return oid.equals(other.getOid()) && context.equals(other.getContext()); }
public Variable getValue(OID instanceOID) { if (getOid().equals(instanceOID)) { return getValue(); } return null; }
public Variable getValue(OID instanceOID) { if (getOid().equals(instanceOID)) { return getValue(); } return null; }
public boolean equals(Object obj) { if (obj instanceof MOScope) { MOScope other = (MOScope)obj; return (lowerBound.equals(other.getLowerBound()) && (((upperBound == null) && (other.getUpperBound() == null)) || (upperBound.equals(other.getUpperBound()))) && (lowerIncluded == other.isLowerIncluded()) && (upperIncluded == other.isUpperIncluded())); } return false; }
private static boolean isInSubtree(OID oid, OID subtree, OctetString mask) { OID maskedSubtree = subtree.mask(mask); OID maskedOID = oid.mask(mask); if (maskedOID.equals(maskedSubtree)) { return true; } return maskedOID.startsWith(maskedSubtree); }
public boolean equals(Object o) { if (o instanceof VariableBinding) { VariableBinding other = (VariableBinding)o; return oid.equals(other.getOid()) && variable.equals(other.getVariable()); } return false; }
public boolean equals(Object o) { if (o instanceof VariableBinding) { VariableBinding other = (VariableBinding)o; return oid.equals(other.getOid()) && variable.equals(other.getVariable()); } return false; }
public void prepareRow(SubRequest subRequest, MOTableRow changeSet) { if (PRIMARY_INDEX.equals(changeSet.getIndex())) { if (snmp4jCfgStorageEntryModel.getRow(PRIMARY_INDEX) == null) { subRequest.getRequest().setErrorStatus(PDU.noCreation); } } }
@SuppressWarnings("unchecked") public boolean setValue(VariableBinding newValueAndInstancceOID) { if (getOid().equals(newValueAndInstancceOID.getOid())) { return (setValue((V) newValueAndInstancceOID.getVariable()) == SnmpConstants.SNMP_ERROR_SUCCESS); } return false; }
public boolean isSearchQuery() { MOContextScope scope = getScope(); return ((!scope.isLowerIncluded()) && ((scope.getUpperBound() == null) || (!scope.getUpperBound().equals(scope.getLowerBound())))); }
public void incrementCounter(CounterEvent event) { if (event.getOid().equals(snmpUnavailableContexts.getOid())) { ((Counter32) snmpUnavailableContexts.getValue()).increment(); event.setCurrentValue(snmpUnavailableContexts.getValue()); } else if (event.getOid().equals(snmpUnknownContexts.getOid())) { ((Counter32) snmpUnknownContexts.getValue()).increment(); event.setCurrentValue(snmpUnknownContexts.getValue()); } }
public void incrementCounter(CounterEvent event) { if (event.getOid().equals(snmpUnavailableContexts.getOid())) { ((Counter32) snmpUnavailableContexts.getValue()).increment(); event.setCurrentValue(snmpUnavailableContexts.getValue()); } else if (event.getOid().equals(snmpUnknownContexts.getOid())) { ((Counter32) snmpUnknownContexts.getValue()).increment(); event.setCurrentValue(snmpUnknownContexts.getValue()); } }
public void prepare(SubRequest subRequest, MOTableRow row, MOTableRow changeSet, int column) { super.prepare(subRequest, row, changeSet, column); if (!subRequest.hasError()) { OID rowPointer = (OID) subRequest.getVariableBinding().getVariable(); MOTableCellInfo cell = getTargetTable().getCellInfo(rowPointer); if (cell.getIndex().equals(row.getIndex())) { // cannot clone from self subRequest.getStatus().setErrorStatus(PDU.inconsistentValue); } } }
public void prepare(SubRequest subRequest, MOTableRow row, MOTableRow changeSet, int column) { super.prepare(subRequest, row, changeSet, column); if (!subRequest.hasError()) { OID rowPointer = (OID) subRequest.getVariableBinding().getVariable(); MOTableCellInfo cell = getTargetTable().getCellInfo(rowPointer); if (cell.getIndex().equals(row.getIndex())) { // cannot clone from self subRequest.getStatus().setErrorStatus(PDU.inconsistentValue); } } }