1 package org
.asamk
.signal
.storage
.groups
;
3 import com
.fasterxml
.jackson
.annotation
.JsonIgnore
;
4 import com
.fasterxml
.jackson
.annotation
.JsonProperty
;
6 import org
.whispersystems
.signalservice
.api
.push
.SignalServiceAddress
;
8 import java
.util
.HashSet
;
11 public abstract class GroupInfo
{
14 public final byte[] groupId
;
16 public GroupInfo(byte[] groupId
) {
17 this.groupId
= groupId
;
21 public abstract String
getTitle();
24 public abstract Set
<SignalServiceAddress
> getMembers();
27 public abstract boolean isBlocked();
30 public abstract void setBlocked(boolean blocked
);
33 public abstract int getMessageExpirationTime();
36 public Set
<SignalServiceAddress
> getMembersWithout(SignalServiceAddress address
) {
37 Set
<SignalServiceAddress
> members
= new HashSet
<>();
38 for (SignalServiceAddress member
: getMembers()) {
39 if (!member
.matches(address
)) {
47 public boolean isMember(SignalServiceAddress address
) {
48 for (SignalServiceAddress member
: getMembers()) {
49 if (member
.matches(address
)) {