Yuta HIGUCHI | db1b830 | 2014-06-26 10:50:39 -0700 | [diff] [blame^] | 1 | package net.onrc.onos.core.topology; |
| 2 | |
| 3 | import java.util.Map; |
| 4 | |
| 5 | /** |
| 6 | * Interface for Elements with StringAttributes. |
| 7 | */ |
| 8 | public interface StringAttributes { |
| 9 | /** |
| 10 | * Gets the string attribute. |
| 11 | * |
| 12 | * @param attr attribute name |
| 13 | * @return attribute value or null |
| 14 | */ |
| 15 | public String getStringAttribute(final String attr); |
| 16 | |
| 17 | /** |
| 18 | * Gets the string attribute. |
| 19 | * |
| 20 | * @param attr attribute name |
| 21 | * @param def default value if {@code attr} did not exist |
| 22 | * @return attribute value or null |
| 23 | */ |
| 24 | public String getStringAttribute(final String attr, final String def); |
| 25 | |
| 26 | /** |
| 27 | * Gets all the string attributes. |
| 28 | * |
| 29 | * @return Immutable Map containing all the String attributes. |
| 30 | */ |
| 31 | public Map<String, String> getAllStringAttributes(); |
| 32 | } |