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 boolean
doesDirtySave()
This event will only dirty the save if the InputSocket does not have connections.boolean
isRegarding(Socket socket)
Queries the event to determine if this event is about this socket.boolean
pipelineShouldRun()
Indicates to thePipelineRunner
that there is an update to one of the values and it should run again.java.lang.String
toString()
-
-
-
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:
doesDirtySave
in interfaceDirtiesSaveEvent
- Returns:
- True if this should dirty the save.
-
pipelineShouldRun
public boolean pipelineShouldRun()
Description copied from interface:RunPipelineEvent
Indicates to thePipelineRunner
that there is an update to one of the values and it should run again.- Specified by:
pipelineShouldRun
in interfaceRunPipelineEvent
- Returns:
- true if the
PipelineRunner.pipelineFlag
should be released.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-