Package nom.tam.fits
Class HeaderCardBuilder
java.lang.Object
nom.tam.fits.HeaderCardBuilder
builder pattern implementation for easy readable header card creation.
- Author:
- nir
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
HeaderCardBuilder
(Header header, IFitsHeader key) constructor to the header card builder. -
Method Summary
Modifier and TypeMethodDescriptioncard()
get the current build card of the builder.card
(IFitsHeader newKey) switch focus to the card with the specified key.set the comment of the current card.header()
noScale()
use no scale for the following decimal values.scale
(int newScale) set the scale for the following decimal values.value
(boolean newValue) set the value of the current card.If the card did not exist yet the card will be created.value
(double newValue) set the value of the current card.If the card did not exist yet the card will be created.value
(float newValue) set the value of the current card.If the card did not exist yet the card will be created.value
(int newValue) set the value of the current card.If the card did not exist yet the card will be created.value
(long newValue) set the value of the current card.If the card did not exist yet the card will be created.set the value of the current card.If the card did not exist yet the card will be created.value
(BigDecimal newValue) set the value of the current card.If the card did not exist yet the card will be created.set the value of the current card.
-
Constructor Details
-
HeaderCardBuilder
constructor to the header card builder.- Parameters:
header
- the header to fill.key
- the first header card to set.
-
-
Method Details
-
card
get the current build card of the builder.- Returns:
- the current card
-
card
switch focus to the card with the specified key. If the card does not exist the card will be created when the value or the comment is set.- Parameters:
newKey
- the new card to set- Returns:
- this
-
comment
set the comment of the current card. If the card does not exist yet the card is created with a null value, if the card needs a value use the value setter first!- Parameters:
newComment
- the new comment to set.- Returns:
- this
- Throws:
HeaderCardException
- if the card creation failed.
-
value
set the value of the current card.If the card did not exist yet the card will be created.- Parameters:
newValue
- the new value to set.- Returns:
- this
- Throws:
HeaderCardException
- if the card creation failed.
-
value
set the value of the current card. If the card did not exist yet the card will be created.- Parameters:
newValue
- the new value to set.- Returns:
- this
- Throws:
HeaderCardException
- if the card creation failed.
-
value
set the value of the current card.If the card did not exist yet the card will be created.- Parameters:
newValue
- the new value to set.- Returns:
- this
- Throws:
HeaderCardException
- if the card creation failed.
-
value
set the value of the current card.If the card did not exist yet the card will be created.- Parameters:
newValue
- the new value to set.- Returns:
- this
- Throws:
HeaderCardException
- if the card creation failed.
-
value
set the value of the current card.If the card did not exist yet the card will be created.- Parameters:
newValue
- the new value to set.- Returns:
- this
- Throws:
HeaderCardException
- if the card creation failed.
-
value
set the value of the current card.If the card did not exist yet the card will be created.- Parameters:
newValue
- the new value to set.- Returns:
- this
- Throws:
HeaderCardException
- if the card creation failed.
-
value
set the value of the current card.If the card did not exist yet the card will be created.- Parameters:
newValue
- the new value to set.- Returns:
- this
- Throws:
HeaderCardException
- if the card creation failed.
-
value
set the value of the current card.If the card did not exist yet the card will be created.- Parameters:
newValue
- the new value to set.- Returns:
- this
- Throws:
HeaderCardException
- if the card creation failed.
-
scale
set the scale for the following decimal values.- Parameters:
newScale
- the new scale to use- Returns:
- this
-
noScale
use no scale for the following decimal values.- Returns:
- this
-
header
- Returns:
- the filled header.
-