@Override public boolean equals(Object o) { if ( o instanceof SyncToken ) { SyncToken other = (SyncToken)o; return CollectionUtil.equals(_value, other._value); } return false; }
@Override public boolean equals(Object o) { if (o instanceof SyncToken) { SyncToken other = (SyncToken) o; return CollectionUtil.equals(value, other.value); } return false; }
@Override public boolean equals(Object o) { if (o instanceof SyncToken) { SyncToken other = (SyncToken) o; return CollectionUtil.equals(value, other.value); } return false; }
static <E> boolean checkValue(List<E> fetchedValues, List<E> expectedValues) { Iterator<E> e = expectedValues.iterator(); List<E> fetchedValuesClone = CollectionUtil.newList(fetchedValues); while (e.hasNext()) { E expected = e.next(); boolean found = false; Iterator<E> f = fetchedValuesClone.iterator(); while (f.hasNext()) { if (CollectionUtil.equals(expected, f.next())) { f.remove(); found = true; break; } } if (!found) { return false; } } return true; }
static <E> boolean checkValue(List<E> fetchedValues, List<E> expectedValues) { Iterator<E> e = expectedValues.iterator(); List<E> fetchedValuesClone = CollectionUtil.newList(fetchedValues); while (e.hasNext()) { E expected = e.next(); boolean found = false; Iterator<E> f = fetchedValuesClone.iterator(); while (f.hasNext()) { if (CollectionUtil.equals(expected, f.next())) { f.remove(); found = true; break; } } if (!found) { return false; } } return true; }
static <E> boolean checkValue(List<E> fetchedValues, List<E> expectedValues) { Iterator<E> e = expectedValues.iterator(); List<E> fetchedValuesClone = CollectionUtil.newList(fetchedValues); while (e.hasNext()) { E expected = e.next(); boolean found = false; Iterator<E> f = fetchedValuesClone.iterator(); while (f.hasNext()) { if (CollectionUtil.equals(expected, f.next())) { f.remove(); found = true; break; } } if (!found) { return false; } } return true; }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (obj instanceof Schema) { Schema other = (Schema) obj; if (!CollectionUtil.equals(getObjectClassInfo(), other.getObjectClassInfo())) { return false; } if (!CollectionUtil.equals(getOperationOptionInfo(), other.getOperationOptionInfo())) { return false; } if (!CollectionUtil.equals(supportedObjectClassesByOperation, other.supportedObjectClassesByOperation)) { return false; } if (!CollectionUtil.equals(supportedOptionsByOperation, other.supportedOptionsByOperation)) { return false; } return true; } return false; }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (obj instanceof Schema) { Schema other = (Schema) obj; if (!CollectionUtil.equals(getObjectClassInfo(), other.getObjectClassInfo())) { return false; } if (!CollectionUtil.equals(getOperationOptionInfo(), other.getOperationOptionInfo())) { return false; } if (!CollectionUtil.equals(supportedObjectClassesByOperation, other.supportedObjectClassesByOperation)) { return false; } if (!CollectionUtil.equals(supportedOptionsByOperation, other.supportedOptionsByOperation)) { return false; } return true; } return false; }
@Override public final boolean equals(Object obj) { // test identity if (this == obj) { return true; } // test for null.. if (obj == null) { return false; } // test that the exact class matches if (!(getClass().equals(obj.getClass()))) { return false; } // test name field.. final Attribute other = (Attribute) obj; if (!is(other.name)) { return false; } if (!CollectionUtil.equals(value, other.value)) { return false; } return true; } }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (obj instanceof Schema) { Schema other = (Schema)obj; if (!CollectionUtil.equals(getObjectClassInfo(),other.getObjectClassInfo())) { return false; } if (!CollectionUtil.equals(getOperationOptionInfo(),other.getOperationOptionInfo())) { return false; } if (!CollectionUtil.equals(_supportedObjectClassesByOperation, other._supportedObjectClassesByOperation)) { return false; } if (!CollectionUtil.equals(_supportedOptionsByOperation, other._supportedOptionsByOperation)) { return false; } return true; } return false; }
@Override public boolean equals(Object obj) { boolean ret = false; if (obj instanceof AttributeInfo) { AttributeInfo other = (AttributeInfo) obj; if (!is(other.getName())) { return false; } if (!getType().equals(other.getType())) { return false; } if (!CollectionUtil.equals(flags, other.flags)) { return false; } return true; } return ret; }
@Override public final boolean equals(Object obj) { // test identity if (this == obj) { return true; } // test for null.. if (obj == null) { return false; } // test that the exact class matches if (!(getClass().equals(obj.getClass()))) { return false; } ObjectClassInfo other = (ObjectClassInfo)obj; if(!is(other.getType())) { return false; } if (!CollectionUtil.equals(getAttributeInfo(), other.getAttributeInfo())) { return false; } if (!_isContainer == other._isContainer) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj instanceof ConnectorObject) { ConnectorObject other = (ConnectorObject)obj; if (!_objectClass.equals(other.getObjectClass())) { return false; } return CollectionUtil.equals(getAttributes(),other.getAttributes()); } return false; }
@Override public boolean equals(Object obj) { boolean ret = false; if (obj instanceof AttributeInfo) { AttributeInfo other = (AttributeInfo) obj; if (!is(other.getName())) { return false; } if (!getType().equals(other.getType())) { return false; } if (!CollectionUtil.equals(flags, other.flags)) { return false; } return true; } return ret; }
@Override public boolean equals(Object obj) { boolean ret = false; if (obj instanceof AttributeInfo) { AttributeInfo other = (AttributeInfo) obj; if (!is(other.getName())) { return false; } if (!getType().equals(other.getType())) { return false; } if (!CollectionUtil.equals(_flags, other._flags)) { return false; } return true; } return ret; }
@Override public boolean equals(Object obj) { if (obj instanceof ConnectorObject) { ConnectorObject other = (ConnectorObject) obj; if (!objectClass.equals(other.getObjectClass())) { return false; } return CollectionUtil.equals(getAttributes(), other.getAttributes()); } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof ConnectorObject) { ConnectorObject other = (ConnectorObject) obj; if (!objectClass.equals(other.getObjectClass())) { return false; } return CollectionUtil.equals(getAttributes(), other.getAttributes()); } return false; }
/** * Test ensures that following operations are supported by all object * classes when supported at all: ScriptOnConnectorApiOp, ScriptOnResourceApiOp, * TestApiOp, ValidateApiOp. */ @Test public void testOpSupportedByAllOClasses() { final Schema schema = getConnectorFacade().schema(); Set<ObjectClassInfo> ocInfos = schema.getObjectClassInfo(); OP_SUPPORTED_BY_ALL_OCLASSES.forEach((apiOp) -> { Set<ObjectClassInfo> suppOClasses = schema.getSupportedObjectClassesByOperation(apiOp); if (!suppOClasses.isEmpty()) { // operation is supported for at least one object class // then it must be supported for all object classes final String MSG = "Operation %s must be in the schema supported by all object classes which supports connector."; assertTrue(CollectionUtil.equals(suppOClasses, ocInfos), String.format(MSG, apiOp)); } }); }
/** * Test ensures that following operations are supported by all object * classes when supported at all: ScriptOnConnectorApiOp, ScriptOnResourceApiOp, * TestApiOp, ValidateApiOp. */ @Test public void testOpSupportedByAllOClasses() { final Schema schema = getConnectorFacade().schema(); Set<ObjectClassInfo> ocInfos = schema.getObjectClassInfo(); for (Class<? extends APIOperation> apiOp : opSupportedByAllOClasses) { Set<ObjectClassInfo> suppOClasses = schema.getSupportedObjectClassesByOperation(apiOp); if (!suppOClasses.isEmpty()) { // operation is supported for at least one object class // then it must be supported for all object classes final String MSG = "Operation %s must be in the schema supported by all object classes which supports connector."; assertTrue(String.format(MSG, apiOp), CollectionUtil.equals(suppOClasses, ocInfos)); } } }
/** * Test ensures that following operations are supported by all object * classes when supported at all: ScriptOnConnectorApiOp, ScriptOnResourceApiOp, * TestApiOp, ValidateApiOp. */ @Test public void testOpSupportedByAllOClasses() { final Schema schema = getConnectorFacade().schema(); Set<ObjectClassInfo> ocInfos = schema.getObjectClassInfo(); for (Class<? extends APIOperation> apiOp : opSupportedByAllOClasses) { Set<ObjectClassInfo> suppOClasses = schema.getSupportedObjectClassesByOperation(apiOp); if (!suppOClasses.isEmpty()) { // operation is supported for at least one object class // then it must be supported for all object classes final String MSG = "Operation %s must be in the schema supported by all object classes which supports connector."; assertTrue(String.format(MSG, apiOp), CollectionUtil.equals(suppOClasses, ocInfos)); } } }