mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Moved classes from messaging package to sync package.
This commit is contained in:
23
briar-api/src/org/briarproject/api/sync/MessageId.java
Normal file
23
briar-api/src/org/briarproject/api/sync/MessageId.java
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
* {@link Message}.
|
||||
*/
|
||||
public class MessageId extends UniqueId {
|
||||
|
||||
public MessageId(byte[] id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof MessageId)
|
||||
return Arrays.equals(id, ((MessageId) o).id);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user