Package org.opentcs.data.peripherals

# Class PeripheralJob

java.lang.Object
org.opentcs.data.TCSObject<PeripheralJob>
org.opentcs.data.peripherals.PeripheralJob

All Implemented Interfaces:
  `java.io.Serializable`

    public class PeripheralJob
    extends TCSObject<PeripheralJob>
    implements java.io.Serializable

Represents a job that is to be processed by a peripheral device.

See Also:
  Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `PeripheralJob.State` | Defines the various states a peripheral job may be in.

- ## Field Summary

  ### Fields inherited from class org.opentcs.data.TCSObject

  `reference`

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `PeripheralJob​(java.lang.String name, java.lang.String reservationToken, PeripheralOperation peripheralOperation)` | Creates a new instance.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.time.Instant` | `getCreationTime()` | Returns the point of time at which this peripheral job was created.
  `java.time.Instant` | `getFinishedTime()` | Returns the point of time at which processing of this peripheral job was finished.
  `PeripheralOperation` | `getPeripheralOperation()` | Returns the operation that is to be performed by the peripheral device.
  `TCSObjectReference<TransportOrder>` | `getRelatedTransportOrder()` | Returns the transport order for which this peripheral job was created.
  `TCSObjectReference<Vehicle>` | `getRelatedVehicle()` | Returns the vehicle for which this peripheral job was created.
  `java.lang.String` | `getReservationToken()` | Returns the token that may be used to reserve a peripheral device.
  `PeripheralJob.State` | `getState()` | Returns this peripheral job's current state.
  `PeripheralJob` | `withCreationTime​(java.time.Instant creationTime)` | Creates a copy of this object, with the given creation time.
  `PeripheralJob` | `withFinishedTime​(java.time.Instant finishedTime)` | Creates a copy of this object, with the given finished time.
  `PeripheralJob` | `withHistory​(ObjectHistory history)` | Creates a copy of this object, with the given history.
  `PeripheralJob` | `withHistoryEntry​(ObjectHistory.Entry entry)` | Creates a copy of this object, with the given history entry integrated.
  `PeripheralJob` | `withPeripheralOperation​(PeripheralOperation peripheralOperation)` | Creates a copy of this object, with the given peripheral operation.
  `PeripheralJob` | `withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)` | Creates a copy of this object, with the given properties.
  `PeripheralJob` | `withProperty​(java.lang.String key, java.lang.String value)` | Creates a copy of this object, with the given property integrated.
  `PeripheralJob` | `withRelatedTransportOrder​(TCSObjectReference<TransportOrder> relatedTransportOrder)` | Creates a copy of this object, with the given related transport order.
  `PeripheralJob` | `withRelatedVehicle​(TCSObjectReference<Vehicle> relatedVehicle)` | Creates a copy of this object, with the given related vehicle.
  `PeripheralJob` | `withReservationToken​(java.lang.String reservationToken)` | Creates a copy of this object, with the given reservation token.
  `PeripheralJob` | `withState​(PeripheralJob.State state)` | Creates a copy of this object, with the given state.

  ### Methods inherited from class org.opentcs.data.TCSObject

  `equals, getHistory, getName, getProperties, getProperty, getReference, hashCode, listWithoutNullValues, mapWithoutNullValues, propertiesWith, setWithoutNullValues, toString`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### PeripheralJob

    public PeripheralJob​(@Nonnull java.lang.String name, @Nonnull java.lang.String reservationToken, @Nonnull PeripheralOperation peripheralOperation)
    Creates a new instance.
    Parameters:
      `name` - The peripheral job's name.
      `reservationToken` - The reservation token to be used.
      `peripheralOperation` - The operation to be performed.

- ## Method Details

  - ### withProperty

    public PeripheralJob withProperty​(java.lang.String key, java.lang.String value)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given property integrated.
    Specified by:
      `withProperty` in class `TCSObject<PeripheralJob>`
    Parameters:
      `key` - The key of the property to be changed.
      `value` - The new value of the property, or `null`, if the property is to be removed.
    Returns:
      A copy of this object, with the given property integrated.

  - ### withProperties

    public PeripheralJob withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given properties.
    Specified by:
      `withProperties` in class `TCSObject<PeripheralJob>`
    Parameters:
      `properties` - The properties.
    Returns:
      A copy of this object, with the given properties.

  - ### withHistoryEntry

    public PeripheralJob withHistoryEntry​(ObjectHistory.Entry entry)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given history entry integrated.
    Specified by:
      `withHistoryEntry` in class `TCSObject<PeripheralJob>`
    Parameters:
      `entry` - The history entry to be integrated.
    Returns:
      A copy of this object, with the given history entry integrated.

  - ### withHistory

    public PeripheralJob withHistory​(ObjectHistory history)
    Description copied from class: `TCSObject`
    Creates a copy of this object, with the given history.
    Specified by:
      `withHistory` in class `TCSObject<PeripheralJob>`
    Parameters:
      `history` - The history.
    Returns:
      A copy of this object, with the given history.

  - ### getReservationToken

    public java.lang.String getReservationToken()
    Returns the token that may be used to reserve a peripheral device.
    Returns:
      The token that may be used to reserve a peripheral device.

  - ### withReservationToken

    public PeripheralJob withReservationToken​(java.lang.String reservationToken)
    Creates a copy of this object, with the given reservation token.
    Parameters:
      `reservationToken` - The reservation token to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getRelatedVehicle

    public TCSObjectReference<Vehicle> getRelatedVehicle()
    Returns the vehicle for which this peripheral job was created.
    Returns:
      The vehicle for which this peripheral job was created.

  - ### withRelatedVehicle

    public PeripheralJob withRelatedVehicle​(TCSObjectReference<Vehicle> relatedVehicle)
    Creates a copy of this object, with the given related vehicle.
    Parameters:
      `relatedVehicle` - The related vehicle to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getRelatedTransportOrder

    public TCSObjectReference<TransportOrder> getRelatedTransportOrder()
    Returns the transport order for which this peripheral job was created.
    Returns:
      The transport order for which this peripheral job was created.

  - ### withRelatedTransportOrder

    public PeripheralJob withRelatedTransportOrder​(TCSObjectReference<TransportOrder> relatedTransportOrder)
    Creates a copy of this object, with the given related transport order.
    Parameters:
      `relatedTransportOrder` - The related transport order to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getPeripheralOperation

    public PeripheralOperation getPeripheralOperation()
    Returns the operation that is to be performed by the peripheral device.
    Returns:
      The operation that is to be performed by the peripheral device.

  - ### withPeripheralOperation

    public PeripheralJob withPeripheralOperation​(PeripheralOperation peripheralOperation)
    Creates a copy of this object, with the given peripheral operation.
    Parameters:
      `peripheralOperation` - The peripheral operation to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getState

    public PeripheralJob.State getState()
    Returns this peripheral job's current state.
    Returns:
      this peripheral job's current state.

  - ### withState

    public PeripheralJob withState​(PeripheralJob.State state)
    Creates a copy of this object, with the given state.
    Parameters:
      `state` - The state to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getCreationTime

    public java.time.Instant getCreationTime()
    Returns the point of time at which this peripheral job was created.
    Returns:
      The point of time at which this peripheral job was created.

  - ### withCreationTime

    public PeripheralJob withCreationTime​(java.time.Instant creationTime)
    Creates a copy of this object, with the given creation time.
    Parameters:
      `creationTime` - The creation time to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.

  - ### getFinishedTime

    public java.time.Instant getFinishedTime()
    Returns the point of time at which processing of this peripheral job was finished.
    Returns:
      The point of time at which processing of this peripheral job was finished.

  - ### withFinishedTime

    public PeripheralJob withFinishedTime​(java.time.Instant finishedTime)
    Creates a copy of this object, with the given finished time.
    Parameters:
      `finishedTime` - The finished time to be set in the copy.
    Returns:
      A copy of this object, differing in the given value.