Package model.estrutura
Class Protocol
java.lang.Object
model.estrutura.Protocol
Represents a protocol node in a doubly linked list structure with an embedded
FIFO data queue.
Each protocol node contains type information, data, and maintains a FIFO data
list
for additional data storage and processing.
This class is designed for protocol management systems where each protocol can have its own queue of data packets or messages.
- Since:
- 2024
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData()
Returns the primary data associated with this protocol.Returns the FIFO data list associated with this protocol.Returns the next protocol node in the sequence.Returns the previous protocol node in the sequence.getType()
Returns the protocol type identifier.void
Sets the primary data for this protocol.void
setNextProtocol
(Protocol nextProtocol) Sets the reference to the next protocol node in the sequence.void
setPreviousProtocol
(Protocol previousProtocol) Sets the reference to the previous protocol node in the sequence.void
Sets the protocol type identifier.toString()
Returns a string representation of this protocol node.
-
Field Details
-
type
-
data
-
nextProtocol
-
previousProtocol
-
dataList
-
-
Constructor Details
-
Protocol
Constructs a new Protocol node with the specified type and data. Initializes next and previous protocol references to null and creates an empty FIFO data list for additional data storage.- Parameters:
type
- the protocol type identifierdata
- the primary data associated with this protocol
-
-
Method Details
-
getType
Returns the protocol type identifier.- Returns:
- the protocol type
-
setType
Sets the protocol type identifier.- Parameters:
type
- the new protocol type
-
getData
Returns the primary data associated with this protocol.- Returns:
- the primary data
-
setData
Sets the primary data for this protocol.- Parameters:
data
- the new primary data
-
getNextProtocol
Returns the next protocol node in the sequence.- Returns:
- the next protocol node, or null if this is the last node
-
setNextProtocol
Sets the reference to the next protocol node in the sequence.- Parameters:
nextProtocol
- the next protocol node, or null to make this the last node
-
getPreviousProtocol
Returns the previous protocol node in the sequence.- Returns:
- the previous protocol node, or null if this is the first node
-
setPreviousProtocol
Sets the reference to the previous protocol node in the sequence.- Parameters:
previousProtocol
- the previous protocol node, or null to make this the first node
-
getDataList
Returns the FIFO data list associated with this protocol. This list can be used to store additional data packets or messages in first-in-first-out order.- Returns:
- the DataList instance for this protocol
-
toString
Returns a string representation of this protocol node. The format is the concatenation of type and data.
-