From 1c5753e1c9851ebb0e7c99db113a600b7afbe324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sylvain=20Hall=C3=A9?= Date: Thu, 23 Nov 2023 14:28:17 -0500 Subject: [PATCH] New signatures for UpdateTableStream and UpdateTableArray --- .../ca/uqac/lif/cep/mtnp/UpdateTableArray.java | 15 ++++++++++++++- .../ca/uqac/lif/cep/mtnp/UpdateTableStream.java | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableArray.java b/Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableArray.java index 6f2d66f..65feff8 100755 --- a/Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableArray.java +++ b/Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableArray.java @@ -1,6 +1,6 @@ /* BeepBeep, an event stream processor - Copyright (C) 2008-2020 Sylvain Hallé + Copyright (C) 2008-2023 Sylvain Hallé This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -17,6 +17,8 @@ */ package ca.uqac.lif.cep.mtnp; +import java.util.List; + import ca.uqac.lif.cep.ProcessorException; import ca.uqac.lif.mtnp.table.HardTable; import ca.uqac.lif.mtnp.table.TableEntry; @@ -39,6 +41,17 @@ public UpdateTableArray(String ... column_names) super(1, column_names); } + /** + * Creates a new instance of the processor. + * @param column_names The names of the columns of the table to update. + * Each element of an array will be the value of the attribute at + * the corresponding position. + */ + public UpdateTableArray(List column_names) + { + super(1, column_names); + } + /** * Creates a new instance of the processor. * @param t The table where entries will be added from incoming diff --git a/Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableStream.java b/Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableStream.java index 3b9c7be..2efd025 100755 --- a/Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableStream.java +++ b/Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableStream.java @@ -1,6 +1,6 @@ /* BeepBeep, an event stream processor - Copyright (C) 2008-2017 Sylvain Hallé + Copyright (C) 2008-2023 Sylvain Hallé This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -17,6 +17,8 @@ */ package ca.uqac.lif.cep.mtnp; +import java.util.List; + import ca.uqac.lif.cep.ProcessorException; import ca.uqac.lif.mtnp.table.HardTable; import ca.uqac.lif.mtnp.table.TableEntry; @@ -41,6 +43,17 @@ public UpdateTableStream(String ... column_names) /** * Creates a new instance of the processor. + * @param column_names The names of the columns of the table to update. + * Each input stream will correspond to the value of an attribute at + * the corresponding position. + */ + public UpdateTableStream(List column_names) + { + super(column_names.size(), column_names); + } + + /** + * Creates a new instance of the processor. * @param t The table where entries will be added from incoming events * @param column_names The names of the columns of the table to update. * Each input stream will correspond to the value of an attribute at