org.umlgraph.doclet
Class RelationPattern

Show UML class diagram
java.lang.Object
  extended by org.umlgraph.doclet.RelationPattern

public class RelationPattern
extends java.lang.Object

A map from relation types to directions


Field Summary
(package private)  RelationDirection[] directions
          A map from RelationType (indexes) to Direction objects
 
Constructor Summary
RelationPattern(RelationDirection defaultDirection)
          Creates a new pattern using the same direction for every relation kind
 
Method Summary
 void addRelation(RelationType relationType, RelationDirection direction)
          Adds, eventually merging, a direction for the specified relation type
 boolean matchesOne(RelationPattern relationPattern)
          Returns true if this patterns matches at least the direction of one of the relations in the other relation patterns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directions

RelationDirection[] directions
A map from RelationType (indexes) to Direction objects

Constructor Detail

RelationPattern

public RelationPattern(RelationDirection defaultDirection)
Creates a new pattern using the same direction for every relation kind

Parameters:
defaultDirection - The direction used to initialize this pattern
Method Detail

addRelation

public void addRelation(RelationType relationType,
                        RelationDirection direction)
Adds, eventually merging, a direction for the specified relation type

Parameters:
relationType -
direction -

matchesOne

public boolean matchesOne(RelationPattern relationPattern)
Returns true if this patterns matches at least the direction of one of the relations in the other relation patterns. Matching is defined by RelationDirection.contains(RelationDirection)

Parameters:
relationPattern -
Returns: