@Override public Stream<OWLClassExpression> nestedClassExpressions() { return accept(new OWLClassExpressionCollector()).stream(); }
@Override public int hashCode() { int hash = super.hashCode(); // literal = null; return hash; }
@Override public int hashCode() { if (hashCode == 0) { hashCode = initHashCode(); } return hashCode; }
@Override public boolean equals(@Nullable Object obj) { if (obj == this) { return true; } if (obj == null) { return false; } if (!(obj instanceof OWLObject)) { return false; } OWLObject other = (OWLObject) obj; if (typeIndex() != other.typeIndex() || hashCode() != other.hashCode()) { return false; } return equalStreams(components(), other.components()); }
@Override public int compareTo(@Nullable OWLObject o) { checkNotNull(o); assert o != null; int diff = Integer.compare(typeIndex(), o.typeIndex()); if (diff != 0) { return diff; } return compareIterators(components().iterator(), o.components().iterator()); }
public boolean equals(Object obj) { if(super.equals(obj)) { return obj instanceof OWLPropertyExpression; } return false; }
@Override public Set<OWLDataProperty> getDataPropertiesInSignature() { Set<OWLDataProperty> result = new HashSet<OWLDataProperty>(); for (OWLEntity ent : getSignature()) { if (ent.isOWLDataProperty()) { result.add(ent.asOWLDataProperty()); } } return result; }
@Override final public int compareTo(OWLObject o) { OWLObjectTypeIndexProvider typeIndexProvider = new OWLObjectTypeIndexProvider(); int thisTypeIndex = typeIndexProvider.getTypeIndex(this); int otherTypeIndex = typeIndexProvider.getTypeIndex(o); int diff = thisTypeIndex - otherTypeIndex; if (diff == 0) { // Objects are the same type return compareObjectOfSameType(o); } else { return diff; } }
@Override public boolean equals(@Nullable Object obj) { if (obj == this) { return true; } if (obj == null) { return false; } if (!(obj instanceof OWLObject)) { return false; } OWLObject other = (OWLObject) obj; if (typeIndex() != other.typeIndex() || hashCode() != other.hashCode()) { return false; } return equalStreams(components(), other.components()); }
@Override public int compareTo(@Nullable OWLObject o) { checkNotNull(o); assert o != null; int diff = Integer.compare(typeIndex(), o.typeIndex()); if (diff != 0) { return diff; } return compareIterators(components().iterator(), o.components().iterator()); }
@Override public boolean equals(Object obj) { if (super.equals(obj)) { return obj instanceof OWLPropertyExpression; } return false; }
@Override public Set<OWLDatatype> getDatatypesInSignature() { Set<OWLDatatype> result = new HashSet<OWLDatatype>(); for (OWLEntity ent : getSignature()) { if (ent.isOWLDatatype()) { result.add(ent.asOWLDatatype()); } } return result; }
if (diff == 0) { return compareObjectOfSameType(o); } else { return diff;
@Override public boolean equals(@Nullable Object obj) { if (obj == this) { return true; } if (obj == null) { return false; } if (!(obj instanceof OWLObject)) { return false; } OWLObject other = (OWLObject) obj; if (typeIndex() != other.typeIndex() || hashCode() != other.hashCode()) { return false; } return equalStreams(components(), other.components()); }
@Override public Set<OWLClassExpression> getNestedClassExpressions() { OWLClassExpressionCollector collector = new OWLClassExpressionCollector(); return this.accept(collector); }
@Override public int compareTo(@Nullable OWLObject o) { checkNotNull(o); assert o != null; int diff = Integer.compare(typeIndex(), o.typeIndex()); if (diff != 0) { return diff; } return compareIterators(components().iterator(), o.components().iterator()); }
public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } if (!(obj instanceof OWLAxiom)) { return false; } OWLAxiom other = (OWLAxiom) obj; return annotations.equals(other.getAnnotations()); }
@Override public Set<OWLClass> getClassesInSignature() { Set<OWLClass> result = new HashSet<OWLClass>(); for (OWLEntity ent : getSignature()) { if (ent.isOWLClass()) { result.add(ent.asOWLClass()); } } return result; }
@Override public int hashCode() { if (hashCode == 0) { hashCode = initHashCode(); } return hashCode; }
@Override public boolean equals(@Nullable Object obj) { if (obj == this) { return true; } if (obj == null) { return false; } if (!(obj instanceof OWLObject)) { return false; } OWLObject other = (OWLObject) obj; if (typeIndex() != other.typeIndex() || hashCode() != other.hashCode()) { return false; } return equalStreams(components(), other.components()); }