|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jade.tools.sl.SLFormatter
Holder for static methods to format messages.
Constructor Summary | |
SLFormatter()
|
Method Summary | |
static java.lang.String |
format(java.lang.String s)
Formats an ACL/SL string. |
static void |
main(java.lang.String[] args)
Main routine is helpful for debugging. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SLFormatter()
Method Detail |
public static java.lang.String format(java.lang.String s)
System.out.println(SLFormatter.format("(vehicle :color red :max-speed 100 :owner (Person :name Luis :nationality Potuguese))"));is the output
(vehicle :color red :max-speed 100 :owner (Person :name Luis :nationality Portuguese))Usually, the input string will come from a call to ACLMessage.getContent(), for example if you have an ACLMessage called msg, you can print formatted content:
System.out.println(SLFormatter.format(msg.getContent());Since text ACL messages follow an SL style, you can also use this function to format entire messages by formatting the return value from msg.toString().
s
- ACL/SL string to be formattedpublic static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |