private final int getHashCode(String lit) { int code = 277; code = code * 37 + getDatatype().hashCode(); code = code * 37 + lit.hashCode() * 65536; if (hasLang()) { code = code * 37 + getLang().hashCode(); } return code; }
@Override public int initHashCode() { int hash = hashIndex(); hash = OWLObject.hashIteration(hash, getDatatype().hashCode()); hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536); return OWLObject.hashIteration(hash, getLang().hashCode()); }
@Override public int initHashCode() { int hash = hashIndex(); hash = OWLObject.hashIteration(hash, getDatatype().hashCode()); hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536); return OWLObject.hashIteration(hash, getLang().hashCode()); }
@Override public int initHashCode() { int hash = hashIndex(); hash = OWLObject.hashIteration(hash, getDatatype().hashCode()); hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536); return OWLObject.hashIteration(hash, getLang().hashCode()); }
@Override public int initHashCode() { int hash = hashIndex(); hash = OWLObject.hashIteration(hash, getDatatype().hashCode()); hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536); return OWLObject.hashIteration(hash, getLang().hashCode()); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this == obj) { return true; } if (!(obj instanceof OWLLiteral)) { return false; } OWLLiteral other = (OWLLiteral) obj; return getLiteral().equals(other.getLiteral()) && getDatatype().equals(other.getDatatype()) && getLang().equals(other.getLang()); }
protected int compareObjectOfSameType(OWLObject object) { OWLLiteral other = (OWLLiteral) object; int diff = getLiteral().compareTo(other.getLiteral()); if (diff != 0) { return diff; } diff = getDatatype().compareTo(other.getDatatype()); if (diff != 0) { return diff; } return getLang().compareTo(other.getLang()); }