org.xbrlapi.networks
Class EquivalentRelationshipsImpl
java.lang.Object
org.xbrlapi.networks.EquivalentRelationshipsImpl
- All Implemented Interfaces:
- Serializable, EquivalentRelationships
public class EquivalentRelationshipsImpl
- extends Object
- implements EquivalentRelationships, Serializable
- Author:
- Geoffrey Shuetrim (geoff@galexy.net)
- See Also:
- Serialized Form
EquivalentRelationshipsImpl
public EquivalentRelationshipsImpl()
size
public int size()
- Specified by:
size in interface EquivalentRelationships
- Returns:
- the number of equivalent relationships in the set.
- See Also:
EquivalentRelationships.size()
addRelationship
public void addRelationship(Relationship relationship)
throws XBRLException
- Specified by:
addRelationship in interface EquivalentRelationships
- Parameters:
relationship - The relationship to add.
- Throws:
XBRLException - if the relationship is not equivalent to
the relationship with the highest priority in the collection.- See Also:
EquivalentRelationships.addRelationship(Relationship)
getActiveRelationship
public Relationship getActiveRelationship()
throws XBRLException
- Specified by:
getActiveRelationship in interface EquivalentRelationships
- Returns:
- the active relationship in the collection of
equivalent relationships. This is any one of the relationships
that has the maximum priority out of the set of relationships in the
collection. If there are no relationships in the collection, return null.
- Throws:
XBRLException- See Also:
EquivalentRelationships.getActiveRelationship()
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
- See Also:
Object.hashCode()
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
- See Also:
Object.equals(java.lang.Object)
getAllRelationships
public Collection<Relationship> getAllRelationships()