Skip to content

Commit

Permalink
New signatures for UpdateTableStream and UpdateTableArray
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainhalle committed Nov 23, 2023
1 parent 87a18c4 commit 1c5753e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
15 changes: 14 additions & 1 deletion Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableArray.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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;
Expand All @@ -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<String> column_names)
{
super(1, column_names);
}

/**
* Creates a new instance of the processor.
* @param t The table where entries will be added from incoming
Expand Down
15 changes: 14 additions & 1 deletion Mtnp/src/ca/uqac/lif/cep/mtnp/UpdateTableStream.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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;
Expand All @@ -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<String> 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
Expand Down

0 comments on commit 1c5753e

Please sign in to comment.