Beispiel #1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!(obj instanceof TimeSeries)) return false;
   TimeSeries other = (TimeSeries) obj;
   return Util.nullSafeEquals(this.k, other.k) && Util.nullSafeEquals(this.v, other.v);
 }
  /**
   * Get the "complementary" TypeQualifierValues for given exclusive type qualifier.
   *
   * @param tqv a type qualifier (which must be exclusive)
   * @return Collection of complementary exclusive type qualifiers
   */
  public static Collection<TypeQualifierValue> getComplementaryExclusiveTypeQualifierValue(
      TypeQualifierValue tqv) {
    assert tqv.isExclusiveQualifier();

    LinkedList<TypeQualifierValue> result = new LinkedList<TypeQualifierValue>();

    for (TypeQualifierValue t : instance.get().allKnownTypeQualifiers) {
      //
      // Any TypeQualifierValue with the same
      // annotation class but a different value is a complementary
      // type qualifier.
      //
      if (t.typeQualifier.equals(tqv.typeQualifier) && !Util.nullSafeEquals(t.value, tqv.value)) {
        result.add(t);
      }
    }

    return result;
  }
 @Override
 public boolean equals(Object o) {
   if (!(o instanceof TypeQualifierValue)) return false;
   TypeQualifierValue other = (TypeQualifierValue) o;
   return typeQualifier.equals(other.typeQualifier) && Util.nullSafeEquals(value, other.value);
 }