private ConcreteNumericRDFDatatypeImpl(IRI datatypeIRI, TermTypeAncestry parentAncestry, TypePropagationSubstitutionHierarchy promotedParentHierarchy, boolean appendToPromotedHierarchy) { super(datatypeIRI, parentAncestry, false); promotedHierarchy = appendToPromotedHierarchy ? promotedParentHierarchy.newHierarchy(this) : promotedParentHierarchy; }
@Override public ConcreteNumericRDFDatatype getCommonPropagatedOrSubstitutedType(ConcreteNumericRDFDatatype otherType){ if (equals(otherType)) return this; if (promotedHierarchy.contains(otherType)) return otherType; TypePropagationSubstitutionHierarchy otherHierarchy = otherType.getPromotionSubstitutionHierarchy(); if (otherHierarchy.contains(this)) return this; return promotedHierarchy.getClosestCommonType(otherHierarchy); }