mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Create PrivateGroupManager Facade and stub implementation
This commit is contained in:
46
briar-api/src/org/briarproject/api/clients/BaseGroup.java
Normal file
46
briar-api/src/org/briarproject/api/clients/BaseGroup.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package org.briarproject.api.clients;
|
||||
|
||||
import org.briarproject.api.sync.Group;
|
||||
import org.briarproject.api.sync.GroupId;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public abstract class BaseGroup {
|
||||
|
||||
private final Group group;
|
||||
private final String name;
|
||||
private final byte[] salt;
|
||||
|
||||
public BaseGroup(@NotNull Group group, @NotNull String name, byte[] salt) {
|
||||
this.group = group;
|
||||
this.name = name;
|
||||
this.salt = salt;
|
||||
}
|
||||
|
||||
public GroupId getId() {
|
||||
return group.getId();
|
||||
}
|
||||
|
||||
public Group getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public byte[] getSalt() {
|
||||
return salt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return group.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof BaseGroup &&
|
||||
getGroup().equals(((BaseGroup) o).getGroup());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user