Package org.onosproject.ui.topo
Class BiLinkMap<B extends BiLink>
- java.lang.Object
-
- org.onosproject.ui.topo.BiLinkMap<B>
-
- Type Parameters:
B
- the type of bi-link subclass
- Direct Known Subclasses:
BaseLinkMap
public abstract class BiLinkMap<B extends BiLink> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description BiLinkMap()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description B
add(Link link)
Adds the given link to our collection, returning the corresponding bi-link (creating one if needed necessary).java.util.Collection<B>
biLinks()
Returns the bi-link instances in the collection.protected abstract B
create(LinkKey key, Link link)
Creates a new instance of a bi-link.int
size()
Returns the number of bi-links in the collection.
-
-
-
Method Detail
-
create
protected abstract B create(LinkKey key, Link link)
Creates a new instance of a bi-link. Concrete subclasses should instantiate and return the appropriate bi-link subclass.- Parameters:
key
- the link keylink
- the initial link- Returns:
- a new instance
-
add
public B add(Link link)
Adds the given link to our collection, returning the corresponding bi-link (creating one if needed necessary).- Parameters:
link
- the link to add to the collection- Returns:
- the corresponding bi-link wrapper
-
biLinks
public java.util.Collection<B> biLinks()
Returns the bi-link instances in the collection.- Returns:
- the bi-links in this map
-
size
public int size()
Returns the number of bi-links in the collection.- Returns:
- number of bi-links
-
-