/** * Compares the specified object with this {@code StatusVariable}. Two * {@code StatusVariable} objects are considered equal if their full path, * collection method and type are identical, and the data (selected by their * type) is equal. * * @param obj the object to compare with this {@code StatusVariable} * @return {@code true} if the argument represents the same * {@code StatusVariable} as this object */ public boolean equals(Object obj) { if (!(obj instanceof StatusVariable)) return false; StatusVariable other = (StatusVariable) obj; if (!equals(id, other.id) || cm != other.cm || type != other.type) return false; switch (type) { case TYPE_INTEGER : return intData == other.intData; case TYPE_FLOAT : return floatData == other.floatData; case TYPE_STRING : return equals(stringData, other.stringData); case TYPE_BOOLEAN : return booleanData == other.booleanData; } return false; // never reached }
/** * Compares the specified object with this <code>StatusVariable</code>. * Two <code>StatusVariable</code> objects are considered equal if their * full path, collection method and type are identical, and the data * (selected by their type) is equal. * * @param obj the object to compare with this <code>StatusVariable</code> * @return <code>true</code> if the argument represents the same * <code>StatusVariable</code> as this object */ public boolean equals(Object obj) { if (!(obj instanceof StatusVariable)) return false; StatusVariable other = (StatusVariable) obj; if (!equals(id, other.id) || cm != other.cm || type != other.type) return false; switch (type) { case TYPE_INTEGER: return intData == other.intData; case TYPE_FLOAT: return floatData == other.floatData; case TYPE_STRING: return equals(stringData, other.stringData); case TYPE_BOOLEAN: return booleanData == other.booleanData; } return false; // never reached }
/** * Compares the specified object with this {@code StatusVariable}. * Two {@code StatusVariable} objects are considered equal if their * full path, collection method and type are identical, and the data * (selected by their type) is equal. * * @param obj the object to compare with this {@code StatusVariable} * @return {@code true} if the argument represents the same * {@code StatusVariable} as this object */ public boolean equals(Object obj) { if (!(obj instanceof StatusVariable)) return false; StatusVariable other = (StatusVariable) obj; if (!equals(id, other.id) || cm != other.cm || type != other.type) return false; switch (type) { case TYPE_INTEGER: return intData == other.intData; case TYPE_FLOAT: return floatData == other.floatData; case TYPE_STRING: return equals(stringData, other.stringData); case TYPE_BOOLEAN: return booleanData == other.booleanData; } return false; // never reached }
/** * Compares the specified object with this {@code StatusVariable}. * Two {@code StatusVariable} objects are considered equal if their * full path, collection method and type are identical, and the data * (selected by their type) is equal. * * @param obj the object to compare with this {@code StatusVariable} * @return {@code true} if the argument represents the same * {@code StatusVariable} as this object */ public boolean equals(Object obj) { if (!(obj instanceof StatusVariable)) return false; StatusVariable other = (StatusVariable) obj; if (!equals(id, other.id) || cm != other.cm || type != other.type) return false; switch (type) { case TYPE_INTEGER: return intData == other.intData; case TYPE_FLOAT: return floatData == other.floatData; case TYPE_STRING: return equals(stringData, other.stringData); case TYPE_BOOLEAN: return booleanData == other.booleanData; } return false; // never reached }
/** * Compares the specified object with this {@code StatusVariable}. Two * {@code StatusVariable} objects are considered equal if their full path, * collection method and type are identical, and the data (selected by their * type) is equal. * * @param obj the object to compare with this {@code StatusVariable} * @return {@code true} if the argument represents the same * {@code StatusVariable} as this object */ @Override public boolean equals(Object obj) { if (!(obj instanceof StatusVariable)) return false; StatusVariable other = (StatusVariable) obj; if (!equals(id, other.id) || cm != other.cm || type != other.type) return false; switch (type) { case TYPE_INTEGER : return intData == other.intData; case TYPE_FLOAT : return floatData == other.floatData; case TYPE_STRING : return equals(stringData, other.stringData); case TYPE_BOOLEAN : return booleanData == other.booleanData; } return false; // never reached }
/** * Compares the specified object with this {@code StatusVariable}. Two * {@code StatusVariable} objects are considered equal if their full path, * collection method and type are identical, and the data (selected by their * type) is equal. * * @param obj the object to compare with this {@code StatusVariable} * @return {@code true} if the argument represents the same * {@code StatusVariable} as this object */ public boolean equals(Object obj) { if (!(obj instanceof StatusVariable)) return false; StatusVariable other = (StatusVariable) obj; if (!equals(id, other.id) || cm != other.cm || type != other.type) return false; switch (type) { case TYPE_INTEGER : return intData == other.intData; case TYPE_FLOAT : return floatData == other.floatData; case TYPE_STRING : return equals(stringData, other.stringData); case TYPE_BOOLEAN : return booleanData == other.booleanData; } return false; // never reached }
/** * Compares the specified object with this {@code StatusVariable}. Two * {@code StatusVariable} objects are considered equal if their full path, * collection method and type are identical, and the data (selected by their * type) is equal. * * @param obj the object to compare with this {@code StatusVariable} * @return {@code true} if the argument represents the same * {@code StatusVariable} as this object */ public boolean equals(Object obj) { if (!(obj instanceof StatusVariable)) return false; StatusVariable other = (StatusVariable) obj; if (!equals(id, other.id) || cm != other.cm || type != other.type) return false; switch (type) { case TYPE_INTEGER : return intData == other.intData; case TYPE_FLOAT : return floatData == other.floatData; case TYPE_STRING : return equals(stringData, other.stringData); case TYPE_BOOLEAN : return booleanData == other.booleanData; } return false; // never reached }