mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Separate the sync layer from its clients. #112
This commit is contained in:
20
briar-api/src/org/briarproject/api/sync/ClientId.java
Normal file
20
briar-api/src/org/briarproject/api/sync/ClientId.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package org.briarproject.api.sync;
|
||||
|
||||
import org.briarproject.api.UniqueId;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Type-safe wrapper for a byte array that uniquely identifies a sync client.
|
||||
*/
|
||||
public class ClientId extends UniqueId {
|
||||
|
||||
public ClientId(byte[] id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof ClientId && Arrays.equals(id, ((ClientId) o).id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user