Package ucar.unidata.util
Class DatedObject
java.lang.Object
ucar.unidata.util.DatedObject
- All Implemented Interfaces:
DatedThing
- Direct Known Subclasses:
AnimationTextControl.DatedText
A utility class that implements DatedThing
-
Constructor Summary
ConstructorsConstructorDescriptionDefault ctorDatedObject
(Date date) Construct this object with just a dateDatedObject
(Date date, Object object) Construct this object with a date and an object -
Method Summary
Modifier and TypeMethodDescriptionboolean
equals methodgetDate()
Get the Date property.Get the Object property.static List
getObjects
(List datedObjects) A utility method that takes a list of DatedObjects-s and returns a list of the objectsstatic List
Select and return the DatedThings taht have dates between the two given dates.void
Set the Date property.void
Set the Object property.static List
Sort the given list of DatedThing-stoString()
to stringstatic List
A utility method that takes a list of DatedThing-s and returns a list of Date-sstatic List
A utility method that takes a list of dates and returns a list of DatedObjects
-
Constructor Details
-
DatedObject
public DatedObject()Default ctor -
DatedObject
Construct this object with just a date- Parameters:
date
- the date
-
DatedObject
Construct this object with a date and an object- Parameters:
date
- the dateobject
- The object
-
-
Method Details
-
select
Select and return the DatedThings taht have dates between the two given dates.- Parameters:
startDate
- Start dateendDate
- End datedatedThings
- DatedThing-s to look at- Returns:
- List of DatedThing-s that are between the given dates
-
wrap
A utility method that takes a list of dates and returns a list of DatedObjects- Parameters:
dates
- List of dates to wrap- Returns:
- A list of DatedObjects
-
unwrap
A utility method that takes a list of DatedThing-s and returns a list of Date-s- Parameters:
datedThings
- List of dates to unwrap- Returns:
- A list of Dates
-
getObjects
A utility method that takes a list of DatedObjects-s and returns a list of the objects- Parameters:
datedObjects
- List of objects- Returns:
- A list of the objects the datedobjects hold
-
sort
Sort the given list of DatedThing-s- Parameters:
datedThings
- list to sortascending
- sort order- Returns:
- sorted list
-
equals
equals method -
setDate
Set the Date property.- Parameters:
value
- The new value for Date
-
getDate
Get the Date property.- Specified by:
getDate
in interfaceDatedThing
- Returns:
- The Date
-
setObject
Set the Object property.- Parameters:
value
- The new value for Object
-
getObject
Get the Object property.- Returns:
- The Object
-
toString
to string
-