Package edu.wpi.grip.core.events
Class SocketChangedEvent
- java.lang.Object
-
- edu.wpi.grip.core.events.SocketChangedEvent
-
- All Implemented Interfaces:
DirtiesSaveEvent,RunPipelineEvent
public class SocketChangedEvent extends java.lang.Object implements RunPipelineEvent, DirtiesSaveEvent
An event that occurs when the value stored in a socket changes. This can happen, for example, as the result of an operation completing, or as a response to user input.
-
-
Constructor Summary
Constructors Constructor Description SocketChangedEvent(Socket socket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandoesDirtySave()This event will only dirty the save if the InputSocket does not have connections.booleanisRegarding(Socket socket)Queries the event to determine if this event is about this socket.booleanpipelineShouldRun()Indicates to thePipelineRunnerthat there is an update to one of the values and it should run again.java.lang.StringtoString()
-
-
-
Constructor Detail
-
SocketChangedEvent
public SocketChangedEvent(Socket socket)
- Parameters:
socket- The socket that changed, with its new value.
-
-
Method Detail
-
isRegarding
public boolean isRegarding(Socket socket)
Queries the event to determine if this event is about this socket.- Parameters:
socket- The socket to check to see if it is related to.- Returns:
- True if this socket is with regards to this event.
-
doesDirtySave
public boolean doesDirtySave()
This event will only dirty the save if the InputSocket does not have connections. Thus the value can only have been changed by a UI component. If the socket has connections then the value change is triggered by another socket's change.- Specified by:
doesDirtySavein interfaceDirtiesSaveEvent- Returns:
- True if this should dirty the save.
-
pipelineShouldRun
public boolean pipelineShouldRun()
Description copied from interface:RunPipelineEventIndicates to thePipelineRunnerthat there is an update to one of the values and it should run again.- Specified by:
pipelineShouldRunin interfaceRunPipelineEvent- Returns:
- true if the
PipelineRunner.pipelineFlagshould be released.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-