jcreek.representation
Class DoubleEntity

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

public class DoubleEntity
extends NumberEntity

A particular type of entity that encapsulates an instance of the Java Double class.

Version:
1.0
Author:
Frode Sørmo

Constructor Summary
DoubleEntity(Entity ent)
          Creates a NumberEntity from an existing Entity.
DoubleEntity(KnowledgeModel model, double number, Entity type)
          Creates a new NumberEntity that is a value of a supplied entity.
DoubleEntity(KnowledgeModel model, java.lang.Double number, Entity type)
          Creates a new NumberEntity that is a value of a supplied entity.
DoubleEntity(KnowledgeModel model, double number, java.lang.String description)
          Creates a new DoubleEntity.
 
Method Summary
 java.lang.Double asDouble()
          Returns the encapsulated number.
static boolean matches(Entity ent)
          An Entity is of type DoubleEntity if and only if it encapsulates an object that is an instance of java.lang.Double.
 
Methods inherited from class jcreek.representation.NumberEntity
asNumber, setValue
 
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

DoubleEntity

public DoubleEntity(KnowledgeModel model,
                    double number,
                    java.lang.String description)
Creates a new DoubleEntity.

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

DoubleEntity

public DoubleEntity(KnowledgeModel model,
                    java.lang.Double number,
                    Entity type)
Creates a new NumberEntity that is a value of a supplied entity.


DoubleEntity

public DoubleEntity(KnowledgeModel model,
                    double number,
                    Entity type)
Creates a new NumberEntity that is a value of a supplied entity.


DoubleEntity

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

Method Detail

asDouble

public java.lang.Double asDouble()
Returns the encapsulated number.


matches

public static boolean matches(Entity ent)
An Entity is of type DoubleEntity if and only if it encapsulates an object that is an instance of java.lang.Double.



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