Add basic methods to like implementations

Addresses #644 by implementing equals, hashCode and toString for SimpleLike and SimpleLikeBatch.
On Thu, 04 Dec 2014 14:42:28 -0800
kluver <notifications@github.com> wrote:

> > @@ -54,5 +56,37 @@ public long getTimestamp() {
> >          return -1;
> >      }
> >  
> > -    // FIXME Add equals/hashcode
> > +    @Override
> > +    public boolean equals(Object o) {
> > +        if (this == o) return true;
> > +        if (!(o instanceof LikeBatch)) return false;
> > +
> > +        LikeBatch that = (LikeBatch) o;
> > +
> > +        if (count != that.getCount()) return false;
> > +        if (itemId != that.getItemId()) return false;
> > +        if (userId != that.getUserId()) return false;
> > +        if (that.getTimestamp() != -1) return false; //other
> > implementations may have timestamps
> 
> I think Im way too late to the press on this one, but why is the
> timestamp always -1? or rather, given that the timestamp is always -1
> in every usecase we can currently immagine, why does likebatch have a
> timestamp?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/lenskit/lenskit/pull/645/files#r21342716

Likebatch extends event; events have timestamps, but
designate a timestamp of -1 when there isn't one.

-Jennifer