From 11235ba0b0e095e888f01143ae6610ff0feba550 Mon Sep 17 00:00:00 2001 From: DieGurke <55625494+DieGurke@users.noreply.github.com> Date: Thu, 26 Mar 2020 20:03:20 +0100 Subject: [PATCH] Added updateStatus method --- src/main/java/envoy/data/GroupMessage.java | 3 +++ src/main/java/module-info.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/envoy/data/GroupMessage.java b/src/main/java/envoy/data/GroupMessage.java index ec2e773..c048fe4 100644 --- a/src/main/java/envoy/data/GroupMessage.java +++ b/src/main/java/envoy/data/GroupMessage.java @@ -1,5 +1,6 @@ package envoy.data; +import java.util.Collections; import java.util.Date; import java.util.Map; @@ -42,5 +43,7 @@ public final class GroupMessage extends Message { this.memberStatuses = memberStatuses; } + public void updateStatus() { setStatus(Collections.min(memberStatuses.values())); } + public Map getMemberStatuses() { return memberStatuses; } } diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index ac8ee44..7177d83 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -5,7 +5,7 @@ * @author Leon Hofmeister * @author Maximilian Käfer * @author Kai S.K. Engelbart - * @since Envoy common v0.1-beta + * @since Envoy Common v0.1-beta */ module envoy.common {