in server/extensions/xep0045-muc/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0045_muc/model/RoomType.java [141:166]
public static void validateAntonyms(EnumSet<RoomType> types) {
if (types.contains(RoomType.Hidden) && types.contains(RoomType.Public)) {
throw new IllegalArgumentException("Room can not be both Hidden and Public");
}
if (types.contains(RoomType.MembersOnly) && types.contains(RoomType.Open)) {
throw new IllegalArgumentException("Room can not be both MembersOnly and Open");
}
if (types.contains(RoomType.Temporary) && types.contains(RoomType.Persistent)) {
throw new IllegalArgumentException("Room can not be both Temporary and Persistent");
}
if (types.contains(RoomType.Unmoderated) && types.contains(RoomType.Moderated)) {
throw new IllegalArgumentException("Room can not be both Unmoderated and Moderated");
}
if (types.contains(RoomType.Unsecured) && types.contains(RoomType.PasswordProtected)) {
throw new IllegalArgumentException("Room can not be both Unsecured and PasswordProtected");
}
if (types.contains(RoomType.NonAnonymous) && types.contains(RoomType.SemiAnonymous)) {
throw new IllegalArgumentException("Room can not be both NonAnonymous and SemiAnonymous");
}
if (types.contains(RoomType.SemiAnonymous) && types.contains(RoomType.FullyAnonymous)) {
throw new IllegalArgumentException("Room can not be both FullyAnonymous and SemiAnonymous");
}
if (types.contains(RoomType.NonAnonymous) && types.contains(RoomType.FullyAnonymous)) {
throw new IllegalArgumentException("Room can not be both NonAnonymous and FullyAnonymous");
}
}