2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.protocol.concepts;
10 import java.io.Serializable;
13 * Interface identifying a piece of state information. Implementations of this interface are required to be immutable.
14 * It is also recommended for the projects to be eligible (and carry) the @Immutable JSR-305 annotation.
16 public interface State extends Immutable, Serializable {
18 * Report a string representation of the state. The interface contract of this method, unlike its normal Object
19 * ancestor, its return value must be consistent with the equals() method, such that the following always holds:
21 * o1.toString().equals(o2.toString()) == o1.equals(o2)
23 * @return String representation of the state information
26 public String toString();