Package ucar.unidata.idv
Class History
java.lang.Object
ucar.unidata.idv.History
- Direct Known Subclasses:
DataSourceHistory,FileHistory
This class is used to keep track of the files and the data sources
that a user has loaded. It is abstract, with derived classes
FileHistory and DataSourceHistory
These history classes are used to show a history list in the File
menu so, once the user has loaded some file, they can easily reload the file.- Author:
- IDV development team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanOverride the equals methodstatic HistoryfindWithAlias(String alias, List historyList, Class theClass) Search the given list for a PC object that has the given alias.getAlias()Get the Alias property.getName()Get the Name property.booleanhasAlias()Does this object have an alias.inthashCode()Override the hashcode method.abstract booleanCreate the data source (or load the file) represented by this object.voidSet the Alias property.voidSet the Name property.toString()Override the toString method
-
Constructor Details
-
History
public History()Parameterless ctor for xml encoding/decoding -
History
Create this History object- Parameters:
name- The name
-
-
Method Details
-
hasAlias
public boolean hasAlias()Does this object have an alias.- Returns:
- Has a non-null, non-zero length alias.
-
process
Create the data source (or load the file) represented by this object. This is actually implemented in the derived classes.- Parameters:
idv- The idv- Returns:
- true if this was successful.
-
setName
Set the Name property.- Parameters:
value- The new value for Name
-
getName
Get the Name property.- Returns:
- The Name
-
setAlias
Set the Alias property.- Parameters:
value- The new value for Alias
-
getAlias
Get the Alias property.- Returns:
- The Alias
-
toString
Override the toString method -
hashCode
public int hashCode()Override the hashcode method. Use the name member -
equals
Override the equals method -
findWithAlias
Search the given list for a PC object that has the given alias.- Parameters:
alias- The alias to serach for.historyList- The list of History objectstheClass- If non-null then only find History objects of the given theClass- Returns:
- The PC object in the list with the given alias or null if none found.
-