com.tensegrity.generic.constraint
Class CustomConstraintRegistry

java.lang.Object
  extended bycom.tensegrity.generic.constraint.CustomConstraintRegistry

public class CustomConstraintRegistry
extends java.lang.Object

This constraint allows to register custom constraints by name.

This class stores the mappings between the keys that identify registered CustomConstraints and the CustomizedConstraint instances that provide the user-defined custom functionality.

Version:
$Id: CustomConstraintRegistry.java,v 1.15 2006/01/26 17:11:06 MichaelKegel Exp $
Author:
S. Rutz
See Also:
CustomizedConstraint

Method Summary
static void register(java.lang.String key, CustomizedConstraint constraint)
          This method allows to register custom constraints by name.
static void unregister(java.lang.String key)
          This method allows to unregister custom constraints by name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

register

public static final void register(java.lang.String key,
                                  CustomizedConstraint constraint)
This method allows to register custom constraints by name.
Notice:
None of the arguments may be null.

Parameters:
key - the key string the constraint is referenced with.
constraint - the CustomConstraint instance associated with this key.
Throws:
InvalidArgumentException - if one of the arguments is null.

unregister

public static final void unregister(java.lang.String key)
This method allows to unregister custom constraints by name. Doing so will allows the garbage collector to collect the customconstraint if no other references to it exist.

Parameters:
key - the key string the constraint is referenced with; may not be null.
Throws:
InvalidArgumentException - if the argument is null.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.