Package de.dlr.proseo.model.util
Klasse SelectionItem
java.lang.Object
de.dlr.proseo.model.util.SelectionItem
This class describes a selectable item consisting of an item type (auxiliary product type), a validity start
time, a validity end time, and the original object for which the selection shall be effected. As this is only a
support structure, all instance variables are publicly accessible.
- Autor:
- Dr. Thomas Bassler
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungThe generation time of the itemThe original object belonging to the itemThe product type of the itemThe start time of the item validity periodThe end time of the item validity period -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic List
<SelectionItem> asSelectionItems
(Collection<Product> products) Creates a list of selection items from a collection of productsboolean
static SelectionItem
fromProduct
(Product product) Create a selection item wrapped around the given productint
hashCode()
void
setStartTime
(long time) Convenience method to set the validity start time from a Unix time value (milliseconds since 1970-01-01T00:00:00 UTC)void
setStartTime
(Date date) Convenience method to set the validity start time from a Java date objectvoid
setStopTime
(long time) Convenience method to set the validity end time from a Unix time value (milliseconds since 1970-01-01T00:00:00 UTC)void
setStopTime
(Date date) Convenience method to set the validity end time from a Java date objecttoString()
-
Felddetails
-
itemType
The product type of the item -
startTime
The start time of the item validity period -
stopTime
The end time of the item validity period -
generationTime
The generation time of the item -
itemObject
The original object belonging to the item
-
-
Konstruktordetails
-
SelectionItem
public SelectionItem()Default constructor -
SelectionItem
public SelectionItem(String itemType, Instant startTime, Instant stopTime, Instant generationTime, Object itemObject) Convenience constructor to create a SelectionItem with all attributes set at once.- Parameter:
itemType
- the item product type to setstartTime
- the start time of the item validity periodstopTime
- the end time of the item validity periodgenerationTime
- the generation time of the itemitemObject
- the original object belonging to the item
-
-
Methodendetails
-
fromProduct
Create a selection item wrapped around the given product- Parameter:
product
- the product to create the selection item from- Gibt zurück:
- a selection item with the same product type and start, stop and generation times as the given product
-
asSelectionItems
Creates a list of selection items from a collection of products- Parameter:
products
- the products to add to the selection item list- Gibt zurück:
- a list of selection items with the same product type and start, stop and generation times as the given products
-
setStartTime
public void setStartTime(long time) Convenience method to set the validity start time from a Unix time value (milliseconds since 1970-01-01T00:00:00 UTC)- Parameter:
time
- the time in milliseconds to set the start time from
-
setStartTime
Convenience method to set the validity start time from a Java date object- Parameter:
date
- the date object to set the start time from
-
setStopTime
public void setStopTime(long time) Convenience method to set the validity end time from a Unix time value (milliseconds since 1970-01-01T00:00:00 UTC)- Parameter:
time
- the time in milliseconds to set the end time from
-
setStopTime
Convenience method to set the validity end time from a Java date object- Parameter:
date
- the date object to set the end time from
-
toString
-
hashCode
public int hashCode() -
equals
-