Package org.jspace
Class FormalField
java.lang.Object
org.jspace.FormalField
- All Implemented Interfaces:
java.io.Serializable
,TemplateField
public class FormalField extends java.lang.Object implements TemplateField
Identifies a formal template field.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description FormalField(java.lang.Class<?> type)
Creates a template field matching any value of typetype
. -
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.Class<?>
getFormalFieldType()
int
hashCode()
boolean
match(java.lang.Object o)
Returnstrue
if parameterso
is instance ofthis.type
.java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
FormalField
public FormalField(java.lang.Class<?> type)Creates a template field matching any value of typetype
.- Parameters:
type
- Class of expected field.
-
-
Method Details
-
match
public boolean match(java.lang.Object o)Returnstrue
if parameterso
is instance ofthis.type
.- Specified by:
match
in interfaceTemplateField
- Parameters:
o
- a generic object- Returns:
true
if the objecto
matches against this field.- See Also:
org.pspaces.jspace.cmg.jresp.knowledge.TemplateField#match(java.lang.Object)
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getFormalFieldType
public java.lang.Class<?> getFormalFieldType()
-