Skip to content

Package: UnidirectionalAssociation

UnidirectionalAssociation

nameinstructionbranchcomplexitylinemethod
UnidirectionalAssociation(long, String, UserType, Type, boolean, boolean)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
isTheSameAs(Object)
M: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package de.fhdw.wtf.persistence.meta;
2:
3: /**
4: * point to point association with a owner and a target.
5: */
6: public class UnidirectionalAssociation extends Association {
7:         
8:         /**
9:          * Creates an unidirectional association between two types.
10:          *
11:          * @param id
12:          * the id of the association
13:          * @param name
14:          * the name of the association
15:          * @param owner
16:          * the owner of the association
17:          * @param target
18:          * the target of the association
19:          * @param essential
20:          * true when the link to the target in a uml is a 1.. and false when 0..
21:          * @param unique
22:          * true when the link to the target in a uml is a ..1 and false when ..*
23:          */
24:         public UnidirectionalAssociation(final long id,
25:                         final String name,
26:                         final UserType owner,
27:                         final Type target,
28:                         final boolean essential,
29:                         final boolean unique) {
30:                 super(id, name, owner, target, essential, unique);
31:         }
32:         
33:         @Override
34:         public boolean isTheSameAs(final java.lang.Object other) {
35:•                if (other instanceof UnidirectionalAssociation) {
36:                         return super.isTheSameAs(other);
37:                 }
38:                 return false;
39:         }
40:         
41: }