com.patternity.graphic.behavioral.Note Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smartrics-RestFixtureExtensions Show documentation
Show all versions of smartrics-RestFixtureExtensions Show documentation
Extensions of the RestFixture.
An extension is a RestFixture with some specific/bespoke behaviour not generic enough to make it to the RestFixture itself.
package com.patternity.graphic.behavioral;
/**
* Represents a note with a label that can be assigned to one agent or overall
* for every agent.
*
* @author cyrille martraire
*/
public class Note extends Event {
private final String label;
public Note(String label) {
this(Agent.ALL, label);
}
public Note(Agent agent, String label) {
super(0, agent);
this.label = label;
}
public String getLabel() {
return label;
}
public String toString() {
return getTarget().isAll() ? getLabel() : getTarget() + ": " + getLabel();
}
}