mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Changed the root package from net.sf.briar to org.briarproject.
This commit is contained in:
37
briar-api/src/org/briarproject/api/Contact.java
Normal file
37
briar-api/src/org/briarproject/api/Contact.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package org.briarproject.api;
|
||||
|
||||
public class Contact {
|
||||
|
||||
private final ContactId id;
|
||||
private final Author author;
|
||||
private final AuthorId localAuthorId;
|
||||
|
||||
public Contact(ContactId id, Author author, AuthorId localAuthorId) {
|
||||
this.id = id;
|
||||
this.author = author;
|
||||
this.localAuthorId = localAuthorId;
|
||||
}
|
||||
|
||||
public ContactId getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Author getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public AuthorId getLocalAuthorId() {
|
||||
return localAuthorId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return id.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if(o instanceof Contact) return id.equals(((Contact) o).id);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user