Remote Systems
v6.4.1

com.ibm.etools.systems.references.impl
Class SystemReferencedObjectHelper

java.lang.Object
  extended bycom.ibm.etools.systems.references.impl.SystemReferencedObjectHelper
All Implemented Interfaces:
ISystemReferencedObject
Direct Known Subclasses:
SystemPersistableReferencedObjectHelper

public class SystemReferencedObjectHelper
extends Object
implements ISystemReferencedObject

This is a class that implements all the methods in the ISystemReferencedObject. It makes implementing this interface trivial. The easiest use of this class is to subclass it, but since that is not always possible, it is not abstract and hence can be leveraged via containment.


Field Summary
static String copyright
           
 
Constructor Summary
SystemReferencedObjectHelper()
          Constructor for SystemReferencedObjectHelper
 
Method Summary
 int addReference(ISystemReferencingObject ref)
          Add a reference, increment reference count, return new count
protected  void assertThis(boolean assertion, String msg)
          Little assertion method for debugging purposes
 int getReferenceCount()
          Return a count of how many referencing objects reference this object.
 ISystemReferencingObject[] getReferencingObjects()
          Return a list of all referencing objects of this object
 void removeAllReferences()
          Clear the list of referenced objects.
 int removeReference(ISystemReferencingObject ref)
          Remove a reference, decrement reference count, return new count
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

SystemReferencedObjectHelper

public SystemReferencedObjectHelper()
Constructor for SystemReferencedObjectHelper

Method Detail

addReference

public int addReference(ISystemReferencingObject ref)
Description copied from interface: ISystemReferencedObject
Add a reference, increment reference count, return new count

Specified by:
addReference in interface ISystemReferencedObject
Returns:
new count of how many referencing objects reference this object.
See Also:
ISystemReferencedObject.addReference(ISystemReferencingObject)

removeReference

public int removeReference(ISystemReferencingObject ref)
Description copied from interface: ISystemReferencedObject
Remove a reference, decrement reference count, return new count

Specified by:
removeReference in interface ISystemReferencedObject
Returns:
new count of how many referencing objects reference this object.
See Also:
ISystemReferencedObject.removeReference(ISystemReferencingObject)

getReferenceCount

public int getReferenceCount()
Description copied from interface: ISystemReferencedObject
Return a count of how many referencing objects reference this object.

Specified by:
getReferenceCount in interface ISystemReferencedObject
See Also:
ISystemReferencedObject.getReferenceCount()

removeAllReferences

public void removeAllReferences()
Clear the list of referenced objects.

Specified by:
removeAllReferences in interface ISystemReferencedObject

getReferencingObjects

public ISystemReferencingObject[] getReferencingObjects()
Description copied from interface: ISystemReferencedObject
Return a list of all referencing objects of this object

Specified by:
getReferencingObjects in interface ISystemReferencedObject
See Also:
ISystemReferencedObject.getReferencingObjects()

assertThis

protected void assertThis(boolean assertion,
                          String msg)
Little assertion method for debugging purposes


Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.