Class: BinaryAssociation

Defined in: web-src/coffee/model/uml/binary_association.coffee
Inherits: model.Link

Overview

A Link between two classes.

Instance Method Summary

Constructor Details

# (void) constructor(classes, name = null, inferred = false)

Parameters:

  • classes ( Array<Class> ) An array of Class objects, the first class is the "from" and the second is the "to" class in a two-linked relation.

Instance Method Details

# (void) set_role_from(user_d_role, class_r, mult)

Set the roles. Roles are first citizen objects so that more resposabilities are assigned.

Parameters:

  • user_d_role ( string ) is a user define role for the current link.
  • class_r ( string ) is the class associated to the current role. This name is also used as default role name.
  • mult ( string ) is the cardinality for the current role.

# (void) set_role_to(user_d_role, class_r, mult)

Set the roles. Roles are first citizen objects so that more resposabilities are assigned.

Parameters:

  • user_d_role ( string ) is a user define role for the current link.
  • class_r ( string ) is the class associated to the current role. This name is also used as default role name.
  • mult ( string ) is the cardinality for the current role.

# (void) get_role()

# (void) get_role_from()

Following functions returns each one of the roles associated "u" roles mean user defined roles and f = from/t = to. "d" roles mean default roles and f = from/t = to. They take the class name.

# (void) get_role_to()

# (void) change_mult_to_null(mult, index)

# (void) change_roles_to_null(roles, index)

# (void) set_from(class_from)

@param class_from an instance of Class.

# (void) get_from()

# (void) set_to(class_to)

# (void) get_to()

# (void) get_classes()

# (?) has_parent(parentclass)

Implement in the subclass if necesary.

Parameters:

  • parentclass ( Class ) The Class instance to check.

Returns:

  • ( ? ) — true if this is a generalization class and has the given parent instance. false otherwise.

# (?) has_association_class()

Check is binary association is with class. However, this function returns always false for links.

Returns:

  • ( ? ) — false

# (Boolean) is_associated(c)

Is this link associated to the given class?

Parameters:

  • c ( Class instance ) The class to test with.

Returns:

  • Boolean

# (void) to_json()

# (void) create_joint(factory, csstheme = null)

# (boolean) same_elts(other)

Compare the relevant elements of these links.

Parameters:

Returns:

  • boolean

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: