Class HeaderCardAccess
- All Implemented Interfaces:
IHeaderAccess
(for internal use / no longer used) Access to a specific FITS header card with runtime exceptions only.
Regular modifications to HeaderCard
may throw HeaderCardException
s, which are hard exceptions. They
really should have been softer runtime exceptions from the start, but unfortunately that was choice this library made
a very long time ago, and we therefore stick to it, at least until the next major code revision (major version 2 at
the earliest). So this class provides an alternative access to a header card converting any
HeaderCardException
s to IllegalArgumentException
.
Unlike HeaderAccess
this class operates on single cards. Methods that specify a keywords are applied to the
selected card if and only if the keyword matches that of the card's keyword.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHeaderCardAccess
(IFitsHeader headerCard, String value) Deprecated.Creates a new access to modifying aHeaderCard
without the hard exceptions thatHeaderCard
may throw. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addValue
(IFitsHeader key, int value) Deprecated.Sets a new integer value for the specified FITS keyword, adding it to the FITS header if necessary.void
addValue
(IFitsHeader key, String value) Deprecated.Sets a new string value for the specified FITS keyword, adding it to the FITS header if necessary.Deprecated.Returns the FITS header card for the given FITS keyword.findCard
(IFitsHeader key) Deprecated.Returns the FITS header card for the given FITS keyword.final Header
Deprecated.Returns the header that this class is providing access to.final HeaderCard
Deprecated.Returns the header card that this class is providing access to.
-
Constructor Details
-
HeaderCardAccess
Deprecated.Creates a new access to modifying a
HeaderCard
without the hard exceptions thatHeaderCard
may throw.Unlike
HeaderAccess
this class operates on single cards. Methods that specify a keywords are applied to the selected card if and only if the keyword matches that of the card's keyword.- Parameters:
headerCard
- the FITS keyword of the card we will provide access tovalue
- the initial string value for the card (assuming the keyword allows string values).- Throws:
IllegalArgumentException
- if the header card could not be created
-
-
Method Details
-
getHeader
Deprecated.Description copied from interface:IHeaderAccess
Returns the header that this class is providing access to.- Specified by:
getHeader
in interfaceIHeaderAccess
- Returns:
- the Header that we access through this class
-
getHeaderCard
Deprecated.Returns the header card that this class is providing access to.- Returns:
- the Header card that we access through this class
- Since:
- 1.19
-
addValue
Deprecated.Description copied from interface:IHeaderAccess
Sets a new integer value for the specified FITS keyword, adding it to the FITS header if necessary.- Specified by:
addValue
in interfaceIHeaderAccess
- Parameters:
key
- the standard or conventional FITS header keywordvalue
- the integer value to assign to the keyword
-
addValue
Deprecated.Description copied from interface:IHeaderAccess
Sets a new string value for the specified FITS keyword, adding it to the FITS header if necessary.- Specified by:
addValue
in interfaceIHeaderAccess
- Parameters:
key
- the standard or conventional FITS header keywordvalue
- the string value to assign to the keyword
-
findCard
Deprecated.Description copied from interface:IHeaderAccess
Returns the FITS header card for the given FITS keyword. It does not set a mark in the header for new additions, making it more similar toHeader.getCard(IFitsHeader)
.- Specified by:
findCard
in interfaceIHeaderAccess
- Parameters:
key
- the standard or conventional FITS header keyword- Returns:
- the matching FITS header card, or
null
if there is no such card within out grasp.
-
findCard
Deprecated.Description copied from interface:IHeaderAccess
Returns the FITS header card for the given FITS keyword. It does not set a mark in the header for new additions, making it more similar toHeader.getCard(String)
.- Specified by:
findCard
in interfaceIHeaderAccess
- Parameters:
key
- the FITS header keyword- Returns:
- the matching FITS header card, or
null
if there is no such card within out grasp.
-
Header
threw hardHeaderCardException
, and this class was added so we can convert these into softIllegalArgumentException
instead. However, now that we demotedHeaderCardException
to be soft exceptions itself, there is no reason to convert. It just adds confusion.