jcreek.representation.cbr
Class ClassEntity

java.lang.Object
  extended byjcreek.representation.Entity
      extended byjcreek.representation.EntityType
          extended byjcreek.representation.cbr.ClassEntity
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable

public class ClassEntity
extends EntityType

Represents an entity type that encapsulates a Java Class object.

Version:
1.0
Author:
Frode Sørmo

Constructor Summary
ClassEntity(Entity ent)
          Creates a ClassEntity from an existing Entity.
ClassEntity(KnowledgeModel model, java.lang.Class myClass, java.lang.String description)
          Creates a new ClassEntity.
 
Method Summary
 java.lang.Class asClass()
          Returns the class encapsulated by this entity
static boolean matches(Entity ent)
          Returns true if the given entitiy can be seen as a ClassEntity
 void setClass(java.lang.Class myClass)
          Sets the class encapsulated by this entity.
 
Methods inherited from class jcreek.representation.Entity
addConstraint, addRelation, addRelation, addRelation, addRelation, addRelation, addRelation, clone, compareTo, equals, getAllSubclasses, getAllSubclassesCollection, getAllSuperclasses, getAllSuperclassesCollection, getConstraints, getCreationTime, getCurrentPartition, getDescription, getEntityData, getEntityObject, getFrameString, getID, getImmediateSubclasses, getImmediateSubclassesCollection, getImmediateSuperclasses, getImmediateSuperclassesCollection, getInheritedConstraints, getKnowledgeModel, getLocalConstraints, getLocalRelation, getLocalRelation, getLocalRelation, getLocalRelation, getLocalRelation, getLocalRelation, getLocalRelations, getLocalRelations, getLocalRelations, getLocalRelations, getLocalRelations, getName, getRelation, getRelation, getRelation, getRelation, getRelationNames, getRelations, getRelations, getRelations, getRelations, getRelations, getRelations, getRelations, getRelationTypes, getValueString, hasEntityObject, hashCode, isAssignableFrom, remove, removeConstraint, removeEntityData, setDescription, setEntityObject, setName, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassEntity

public ClassEntity(KnowledgeModel model,
                   java.lang.Class myClass,
                   java.lang.String description)
            throws NameAlreadyExistException
Creates a new ClassEntity.

Parameters:
model - The KnowledgeModel to create the new entity in.
myClass - The class to encapsulate in this entity.
description - The description of the entity.

ClassEntity

public ClassEntity(Entity ent)
            throws EntityTypeNotMatchedException
Creates a ClassEntity from an existing Entity.

Method Detail

setClass

public void setClass(java.lang.Class myClass)
Sets the class encapsulated by this entity. param myClass The class to set as the new value.


asClass

public java.lang.Class asClass()
Returns the class encapsulated by this entity


matches

public static boolean matches(Entity ent)
Returns true if the given entitiy can be seen as a ClassEntity

Parameters:
ent - The entity to check.


Created at IDI, NTNU by the Artificial Intelligence and Learning group