ilog.cpl.model
Class IlpAbstractClass

java.lang.Object
  extended by ilog.cpl.model.IlpAbstractClass
All Implemented Interfaces:
IlpAttributeGroup, IlpClass
Direct Known Subclasses:
IlpDefaultClass

public abstract class IlpAbstractClass
extends Object
implements IlpClass

ILOG CPL Abstract Business Class. Instances of IlpClass represent classes of the model. This class provides a basic implementation that should be subclassed in order to create the user model classes.

Since:
JTGO 3.0

Constructor Summary
protected IlpAbstractClass(String name, IlpClass superClass, List subClasses)
          Creates an IlpAbstractClass.
 
Method Summary
 void addSubClass(IlpClass subClass)
          Adds a subclass to the list.
 String getName()
          Returns the name of the class.
 Collection getSubClasses()
          Returns the subclasses of this class as a Collection.
 IlpClass getSuperClass()
          Returns the superclass of this class as an IlpClass.
 boolean isAssignableFrom(IlpClass cls)
          Determines whether this IlpClass is either the same as, or is a superclass of, the class represented by the specified IlpClass parameter.
 boolean isSubClassOf(IlpClass parent)
          Returns true if the current class is a subclass of the parent.
 void removeSubClass(IlpClass subClass)
          Removes a class from the subclasses list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.cpl.model.IlpClass
newInstance, newInstance
 
Methods inherited from interface ilog.cpl.model.IlpAttributeGroup
addAttributeGroupListener, fireEvent, getAttribute, getAttributes, getDeclaredAttributes, hasAttribute, removeAttributeGroupListener
 

Constructor Detail

IlpAbstractClass

protected IlpAbstractClass(String name,
                           IlpClass superClass,
                           List subClasses)
Creates an IlpAbstractClass.

Parameters:
name - Business class name
superClass - The superclass of the business class.
subClasses - The subclasses of the new business class.
Method Detail

getName

public String getName()
Returns the name of the class.

Specified by:
getName in interface IlpAttributeGroup

getSuperClass

public IlpClass getSuperClass()
Returns the superclass of this class as an IlpClass. This method should return null when this class has no superclass.

Specified by:
getSuperClass in interface IlpClass
Returns:
The IlpClass superclass.

getSubClasses

public Collection getSubClasses()
Returns the subclasses of this class as a Collection. If the subclass collection is empty, this method returns Collections.EMPTY_LIST.

Specified by:
getSubClasses in interface IlpClass
Returns:
An unmodifiable collection containing IlpClass instances.

isSubClassOf

public boolean isSubClassOf(IlpClass parent)
Returns true if the current class is a subclass of the parent.

Specified by:
isSubClassOf in interface IlpClass
Parameters:
parent - The superclass being checked.
Returns:
The boolean value indicating whether this class is a subclass of the parent class.

isAssignableFrom

public boolean isAssignableFrom(IlpClass cls)
Determines whether this IlpClass is either the same as, or is a superclass of, the class represented by the specified IlpClass parameter. It returns true if so; otherwise it returns false.

Specified by:
isAssignableFrom in interface IlpClass
Parameters:
cls - The IlpClass object to be checked.
Returns:
The boolean value indicating whether objects of the type cls can be assigned to objects of this class.

addSubClass

public void addSubClass(IlpClass subClass)
Adds a subclass to the list.

This methods adds the given class as a subclass of this instance. This method does not update the superclass information in the argument class. To do this, use the method setSuperClass.


removeSubClass

public void removeSubClass(IlpClass subClass)
Removes a class from the subclasses list.

This methods removes the given class as subclass of this instance. This method does not update the superclass information in the argument class. To do this, use the method setSuperClass.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.