Skip to content
Browse files

Added a new constructor for cloning an existing event with a differen…

…t target ID

git-svn-id: https://svn.apache.org/repos/asf/incubator/ace/trunk@1170533 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 3403881 commit 644063adc08bce4f4a6f851c423cdc247bc0994a @m4rr5 m4rr5 committed Sep 14, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 ace-log/src/main/java/org/apache/ace/log/LogEvent.java
View
8 ace-log/src/main/java/org/apache/ace/log/LogEvent.java
@@ -28,16 +28,14 @@
* Log event from a specific gateway and log.
*/
public class LogEvent implements Comparable {
-
private final String m_gatewayID;
private final long m_logID;
private final long m_id;
private final long m_time;
private final int m_type;
private final Dictionary m_properties;
- public LogEvent(String gatewayID, long logID, long id, long time,
- int type, Dictionary properties) {
+ public LogEvent(String gatewayID, long logID, long id, long time, int type, Dictionary properties) {
m_gatewayID = gatewayID;
m_logID = logID;
m_id = id;
@@ -46,6 +44,10 @@ public LogEvent(String gatewayID, long logID, long id, long time,
m_properties = properties;
}
+ public LogEvent(String gatewayID, LogEvent source) {
+ this(gatewayID, source.getLogID(), source.getID(), source.getTime(), source.getType(), source.getProperties());
+ }
+
public LogEvent(String representation) {
try {
StringTokenizer st = new StringTokenizer(representation, ",");

0 comments on commit 644063a

Please sign in to comment.
Something went wrong with that request. Please try again.