@SuppressWarnings("unchecked") @Override public boolean equals(Object object) { if ((object instanceof DefaultPiecewiseTransform1D)) { final DefaultPiecewiseTransform1D<?> that = (DefaultPiecewiseTransform1D<?>) object; if (this.hasDefaultValue != that.hasDefaultValue) return false; if (PiecewiseUtilities.equals(defaultValue, that.defaultValue)) ; return false; } return super.equals(object); }
/** * Compares the specified object with this domain element list for equality. If the two objects are instances of the {@link DefaultDomain1D} * class, then the test check for the equality of the single elements. */ @SuppressWarnings("unchecked") @Override public boolean equals(final Object object) { if (this == object) return true; if (!(object instanceof DefaultDomain1D)) return false; final DefaultDomain1D that = (DefaultDomain1D) object; if (getEquivalenceClass() != that.getEquivalenceClass()) return false; if (!this.getName().equals(that.getName())) return false; if (!this.getApproximateDomainRange().equals(that.getApproximateDomainRange())) return false; if (Arrays.equals(this.elements, that.elements)) { assert Arrays.equals(this.minimums, that.minimums); return true; } return false; }
/** * Constructor for {@link DefaultDomain1D}. * * @param inDomainElements {@link DomainElement1D} objects that make up this list. */ public DefaultDomain1D(E[] inDomainElements) { init(inDomainElements); }
@Override public int hashCode() { if (hashCode < 0) { int result = PiecewiseUtilities.deepHashCode(elements); result = PiecewiseUtilities.deepHashCode(minimums); result = PiecewiseUtilities.hash(getName(), result); hashCode = PiecewiseUtilities.hash(getApproximateDomainRange(), hashCode); } return hashCode; } }
@Override public int hashCode() { if (hashCode >= 0) return hashCode; hashCode = 37; hashCode = PiecewiseUtilities.hash(defaultValue, hashCode); hashCode = PiecewiseUtilities.hash(hasDefaultValue, hashCode); hashCode = PiecewiseUtilities.hash(super.hashCode(), hashCode); return hashCode; }
@Override public int hashCode() { if (hashCode < 0) { int result = PiecewiseUtilities.deepHashCode(elements); result = PiecewiseUtilities.deepHashCode(minimums); result = PiecewiseUtilities.hash(getName(), result); hashCode = PiecewiseUtilities.hash(getApproximateDomainRange(), hashCode); } return hashCode; } }
@Override public int hashCode() { if (hashCode >= 0) return hashCode; hashCode = 37; hashCode = PiecewiseUtilities.hash(defaultValue, hashCode); hashCode = PiecewiseUtilities.hash(hasDefaultValue, hashCode); hashCode = PiecewiseUtilities.hash(super.hashCode(), hashCode); return hashCode; }
int i = getDomainElementIndex(value);
/** * Compares the specified object with this domain element list for equality. If the two objects are instances of the {@link DefaultDomain1D} * class, then the test check for the equality of the single elements. */ @SuppressWarnings("unchecked") @Override public boolean equals(final Object object) { if (this == object) return true; if (!(object instanceof DefaultDomain1D)) return false; final DefaultDomain1D that = (DefaultDomain1D) object; if (getEquivalenceClass() != that.getEquivalenceClass()) return false; if (!this.getName().equals(that.getName())) return false; if (!this.getApproximateDomainRange().equals(that.getApproximateDomainRange())) return false; if (Arrays.equals(this.elements, that.elements)) { assert Arrays.equals(this.minimums, that.minimums); return true; } return false; }
/** * Constructor for {@link DefaultDomain1D}. * * @param inDomainElements {@link DomainElement1D} objects that make up this list. */ public DefaultDomain1D(E[] inDomainElements) { init(inDomainElements); }
@SuppressWarnings("unchecked") @Override public boolean equals(Object object) { if ((object instanceof DefaultPiecewiseTransform1D)) { final DefaultPiecewiseTransform1D<?> that = (DefaultPiecewiseTransform1D<?>) object; if (this.hasDefaultValue != that.hasDefaultValue) return false; if (PiecewiseUtilities.equals(defaultValue, that.defaultValue)) ; return false; } return super.equals(object); }