Fixup checkstyle
[controller.git] / opendaylight / md-sal / sal-distributed-eos / src / main / java / org / opendaylight / controller / cluster / entityownership / messages / CandidateAdded.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.cluster.entityownership.messages;
9
10 import java.util.Collection;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
12
13 /**
14  * Message sent when a new candidate is added for an entity.
15  *
16  * @author Moiz Raja
17  * @author Thomas Pantelis
18  */
19 public class CandidateAdded {
20     private final YangInstanceIdentifier entityPath;
21     private final Collection<String> allCandidates;
22     private final String newCandidate;
23
24     public CandidateAdded(final YangInstanceIdentifier entityPath, final String newCandidate,
25             final Collection<String> allCandidates) {
26         this.entityPath = entityPath;
27         this.newCandidate = newCandidate;
28         this.allCandidates = allCandidates;
29     }
30
31     public YangInstanceIdentifier getEntityPath() {
32         return entityPath;
33     }
34
35     public Collection<String> getAllCandidates() {
36         return allCandidates;
37     }
38
39     public String getNewCandidate() {
40         return newCandidate;
41     }
42
43     @Override
44     public String toString() {
45         return "CandidateAdded [entityPath=" + entityPath + ", newCandidate=" + newCandidate + ", allCandidates="
46                 + allCandidates + "]";
47     }
48 }