Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/11/08 21:09:14 (16 years ago)
Author:
gkronber
Message:

added overrides for Equals and GetHashCode in Entity, Literal, SerializedLiteral to behave like values (equal means same uri or value). #200 (Simple indexer for results and matching search-frontend for solution-quality).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/Entity.cs

    r544 r552  
    3434      this.Uri = uri;
    3535    }
     36
     37    public override bool Equals(object obj) {
     38      if(this == obj) return true;
     39      Entity other = obj as Entity;
     40      if(other == null) return false;
     41      else return other.Uri.Equals(this.Uri);
     42    }
     43
     44    public override int GetHashCode() {
     45      return Uri.GetHashCode();
     46    }
    3647  }
    3748}
Note: See TracChangeset for help on using the changeset viewer.