|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalice.tucson.api.Agent
alice.tucsonx.sms.Checker
La classe rappresenta l'agente Checker Questo agente è generato dal tuple center nella reazione settata all'avvio del nodo
Nested Class Summary |
Nested classes inherited from class alice.tucson.api.Agent |
|
Field Summary | |
private static java.lang.String |
DEFAULT_TID
Centro di tuple di default |
private static int |
PHONE_NUMBER_LENGTH
Lunghezza del numero del cellulare (comprensivo del prefisso internazionale) |
private static int |
TEXT_LENGTH
Lunghezza del testo |
private alice.tucson.api.TupleCentreId |
tid
|
private alice.logictuple.TupleArgument |
tpl
|
Fields inherited from class alice.tucson.api.Agent |
|
Constructor Summary | |
Checker(alice.tucson.api.AgentId id,
alice.logictuple.LogicTuple args)
Costruttore della classe |
Method Summary | |
protected void |
body()
Corpo |
private int |
howManyBlocks(java.lang.String txt)
Calcola da quanti blocchi di 160 caratteri è formato Text |
private boolean |
isNumberCorrect(java.lang.String number)
Checks if the number is correct Grammar: full_number = + number | number number = digit | number digit = 0 | 1 | ... | 9 |
private java.lang.String |
removeQuotationMarks(java.lang.String txt)
Elimina gli apici dal testo solo se la lunghezza della stringa è maggiore di 4 |
Methods inherited from class alice.tucson.api.Agent |
getContext, getId, getSpec, in, inp, out, rd, rdp, setSpec, spawn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int PHONE_NUMBER_LENGTH
private static final int TEXT_LENGTH
private alice.logictuple.TupleArgument tpl
private static final java.lang.String DEFAULT_TID
private alice.tucson.api.TupleCentreId tid
Constructor Detail |
public Checker(alice.tucson.api.AgentId id, alice.logictuple.LogicTuple args) throws java.lang.Exception
Method Detail |
protected void body()
private java.lang.String removeQuotationMarks(java.lang.String txt)
txt
- stringa da cui rimuovee gli apici
private int howManyBlocks(java.lang.String txt)
private boolean isNumberCorrect(java.lang.String number)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |