Classifier
Class MACSAnticipation

java.lang.Object
  |
  +--Classifier.Message
        |
        +--Classifier.Perception
              |
              +--Classifier.MACSAnticipation
All Implemented Interfaces:
Anticipation, java.lang.Comparable

public final class MACSAnticipation
extends Perception
implements Anticipation

This class is used to represent the anticipation part of a MACS classifier.

Author:
Olivier Sigaud and Pierre Gérard.

Field Summary
 
Fields inherited from class Classifier.Perception
isSpecializationUpdated, length, nbSpecValues, specialization, tokenArray
 
Constructor Summary
MACSAnticipation(Classifier.MACSAnticipation perception)
           
MACSAnticipation(java.lang.String form)
           
MACSAnticipation(java.lang.String form, boolean val)
          Creation of a random anticipation
MACSAnticipation(java.lang.String strInit, java.lang.String form)
           
 
Method Summary
 byte getIndexOfFirstSpecializedToken()
           
 boolean isCompatibleWith(Classifier.Anticipation message)
           
 boolean isSpecialized(byte i)
           
 boolean matches(Classifier.Message message)
           
 
Methods inherited from class Classifier.Perception
compareTo, computeNbTokens, computeNbTokens, correctSoAsToMatch, diffWith, equals, equals, generalize, getForm, getIndexOfFirstDontCareToken, getIndexOfFirstDontKnowToken, getLength, getNbSpecValues, getNbSpecValues, getSpecialization, getToken, isDontCare, isDontChange, isDontKnow, isEqualOrLessGeneralThan, isEqualOrLessGeneralThan, isEqualOrMoreGeneralThan, isEqualOrMoreGeneralThan, isGeneral, isLessGeneralThan, isLessGeneralThan, isMoreGeneralThan, isMoreGeneralThan, isSpecialized, matches, passThrough, readNbValues, setNbSpecValues, setSpecializedToken, setToken, setValue, setValue, toString, toStringShort
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MACSAnticipation

public MACSAnticipation(Classifier.MACSAnticipation perception)
Parameters:
perception -

MACSAnticipation

public MACSAnticipation(java.lang.String strInit,
                        java.lang.String form)
Parameters:
strInit -
form -

MACSAnticipation

public MACSAnticipation(java.lang.String form,
                        boolean val)
Creation of a random anticipation

Parameters:
form -
val -

MACSAnticipation

public MACSAnticipation(java.lang.String form)
Parameters:
form -
Method Detail

getIndexOfFirstSpecializedToken

public final byte getIndexOfFirstSpecializedToken()
Specified by:
getIndexOfFirstSpecializedToken in interface Anticipation
Overrides:
getIndexOfFirstSpecializedToken in class Perception
Returns:
byte

isSpecialized

public final boolean isSpecialized(byte i)
Specified by:
isSpecialized in interface Anticipation
Overrides:
isSpecialized in class Perception
Parameters:
i -
Returns:
boolean

matches

public final boolean matches(Classifier.Message message)
Specified by:
matches in interface Anticipation
Overrides:
matches in class Message
Parameters:
message -
Returns:
boolean

isCompatibleWith

public final boolean isCompatibleWith(Classifier.Anticipation message)
Specified by:
isCompatibleWith in interface Anticipation
Parameters:
message -
Returns:
boolean