org.specrunner.pipeline.core
Class ChannelImpl
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
org.specrunner.pipeline.core.ChannelImpl
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,Object>, IChannel
public class ChannelImpl
- extends HashMap<String,Object>
- implements IChannel
Default implementation of a channel.
- Author:
- Thiago Santos
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
ChannelImpl
public ChannelImpl()
- Super class constructor.
ChannelImpl
public ChannelImpl(int initialCapacity,
float loadFactor)
- Super class constructor.
- Parameters:
initialCapacity - see new Map(initialCapacity,loadFactor)loadFactor - see new Map(initialCapacity,loadFactor)
ChannelImpl
public ChannelImpl(int initialCapacity)
- Super class constructor.
- Parameters:
initialCapacity - see new Map(initialCapacity,loadFactor)
ChannelImpl
public ChannelImpl(Map<? extends String,? extends Object> m)
- Super class constructor.
- Parameters:
m - see new Map(m)
add
public IChannel add(String key,
Object value)
- Description copied from interface:
IChannel
- Add data to the channel.
- Specified by:
add in interface IChannel
- Parameters:
key - The data key.value - The data value.
- Returns:
- The channel itself.
get
public <T> T get(String key,
Class<T> type)
throws NotFoundException,
InvalidTypeException
- Specified by:
get in interface IChannel
- Type Parameters:
T - The expected type.- Parameters:
key - The object name.type - The object type.
- Returns:
- The object instance.
- Throws:
NotFoundException - If key is not present.
InvalidTypeException - If type does not match.
Copyright © 2014. All rights reserved.