public class FactTemplateImpl extends Object implements FactTemplate
| Constructor and Description |
|---|
FactTemplateImpl() |
FactTemplateImpl(InternalKnowledgePackage pkg,
String name,
FieldTemplate[] fields) |
| Modifier and Type | Method and Description |
|---|---|
Fact |
createFact(long id)
Method takes a list of Slots and creates a deffact from it.
|
boolean |
equals(Object object) |
FieldTemplate[] |
getAllFieldTemplates()
Return all the slots
|
FieldTemplate |
getFieldTemplate(int index)
get the Slot at the given pattern id
|
FieldTemplate |
getFieldTemplate(String name)
A convienance method for finding the slot matching
the String name.
|
int |
getFieldTemplateIndex(String name)
Look up the pattern index of the slot
|
String |
getName()
the template name is an alias for an object
|
int |
getNumberOfFields()
Return the number of slots in the deftemplate
|
InternalKnowledgePackage |
getPackage() |
int |
hashCode() |
void |
readExternal(ObjectInput in) |
String |
toString()
Method will return a string format with the int type code
for the slot type
|
void |
writeExternal(ObjectOutput out) |
public FactTemplateImpl()
public FactTemplateImpl(InternalKnowledgePackage pkg, String name, FieldTemplate[] fields)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic InternalKnowledgePackage getPackage()
getPackage in interface FactTemplatepublic String getName()
getName in interface FactTemplatepublic int getNumberOfFields()
getNumberOfFields in interface FactTemplatepublic FieldTemplate[] getAllFieldTemplates()
getAllFieldTemplates in interface FactTemplatepublic FieldTemplate getFieldTemplate(String name)
getFieldTemplate in interface FactTemplatename - public FieldTemplate getFieldTemplate(int index)
getFieldTemplate in interface FactTemplatepublic int getFieldTemplateIndex(String name)
getFieldTemplateIndex in interface FactTemplatepublic Fact createFact(long id)
createFact in interface FactTemplatepublic String toString()
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.