Moved some API classes into packages.

This commit is contained in:
akwizgran
2015-12-16 13:46:08 +00:00
parent 9fbdb08cf1
commit c5282c5b17
115 changed files with 408 additions and 430 deletions

View File

@@ -0,0 +1,29 @@
package org.briarproject.api.contact;
/**
* Type-safe wrapper for an integer that uniquely identifies a contact within
* the scope of a single node.
*/
public class ContactId {
private final int id;
public ContactId(int id) {
this.id = id;
}
public int getInt() {
return id;
}
@Override
public int hashCode() {
return id;
}
@Override
public boolean equals(Object o) {
if (o instanceof ContactId) return id == ((ContactId) o).id;
return false;
}
}