EMMA Coverage Report (generated Tue Apr 17 08:51:20 BST 2007)
[all classes][org.jtoolkit.essence.data]

COVERAGE SUMMARY FOR SOURCE FILE [ClusterEvent.java]

nameclass, %method, %block, %line, %
ClusterEvent.java100% (1/1)75%  (3/4)58%  (15/26)67%  (6/9)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ClusterEvent100% (1/1)75%  (3/4)58%  (15/26)67%  (6/9)
notifyListener (Event$Listener): void 0%   (0/1)0%   (0/11)0%   (0/3)
ClusterEvent (String, Map): void 100% (1/1)100% (9/9)100% (4/4)
getChanges (): Map 100% (1/1)100% (3/3)100% (1/1)
getName (): String 100% (1/1)100% (3/3)100% (1/1)

1package org.jtoolkit.essence.data;
2 
3import org.jetbrains.annotations.NotNull;
4import org.jtoolkit.essence.app.pojo.DataValue;
5import org.jtoolkit.essence.concurrency.Immutable;
6import org.jtoolkit.essence.data.impl.MetaData;
7 
8import java.util.Collection;
9import java.util.Map;
10 
11/*
12   Copyright 2006 Peter Lawrey
13 
14   Licensed under the Apache License, Version 2.0 (the "License");
15   you may not use this file except in compliance with the License.
16   You may obtain a copy of the License at
17 
18       http://www.apache.org/licenses/LICENSE-2.0
19 
20   Unless required by applicable law or agreed to in writing, software
21   distributed under the License is distributed on an "AS IS" BASIS,
22   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23   See the License for the specific language governing permissions and
24   limitations under the License.
25*/
26/**
27 * @author Peter Lawrey
28 */
29@Immutable
30public class ClusterEvent extends DataValue implements Event {
31    private final String name;
32    private final Map<String, Collection<MetaData<Object,Object>>> changes;
33 
34    public ClusterEvent(@NotNull String name, @NotNull Map<String, Collection<MetaData<Object,Object>>> changes) {
35        this.name = name;
36        this.changes = changes;
37    }
38 
39    public void notifyListener(@NotNull Listener l) {
40        if (l instanceof Cluster.ClusterListener) {
41            ((Cluster.ClusterListener) l).onUpdate(name, changes);
42        }
43    }
44 
45    @NotNull public String getName() {
46        return name;
47    }
48 
49    @NotNull public Map<String, Collection<MetaData<Object,Object>>> getChanges() {
50        return changes;
51    }
52}

[all classes][org.jtoolkit.essence.data]
EMMA 2.0.5312 (C) Vladimir Roubtsov