mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Moved some API classes into packages.
This commit is contained in:
40
briar-api/src/org/briarproject/api/contact/Contact.java
Normal file
40
briar-api/src/org/briarproject/api/contact/Contact.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package org.briarproject.api.contact;
|
||||
|
||||
import org.briarproject.api.identity.Author;
|
||||
import org.briarproject.api.identity.AuthorId;
|
||||
|
||||
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