Class CardType<T>

java.lang.Object
uk.ac.starlink.fits.CardType<T>

public class CardType<T> extends Object
Defines different types of FITS header card. Each instance knows how to parse an 80-byte card.
Since:
4 Mar 2022
Author:
Mark Taylor
  • Field Details

    • HISTORY

      public static final CardType<Void> HISTORY
      HISTORY card type.
    • COMMENT

      public static final CardType<Void> COMMENT
      COMMENT card type.
    • COMMENT_BLANK

      public static final CardType<Void> COMMENT_BLANK
      Card type with nothing in the keyword field.
    • CONTINUE

      public static final CardType<String> CONTINUE
      CONTINUE card type.
    • END

      public static final CardType<Void> END
      END card type.
    • STRING

      public static final CardType<String> STRING
      Standard key/value card with string content.
    • STRING_HIER

      public static final CardType<String> STRING_HIER
      HIERARCH key/value card with string content.
    • LOGICAL

      public static final CardType<Boolean> LOGICAL
      Standard key/value card with logical content.
    • LOGICAL_HIER

      public static final CardType<Boolean> LOGICAL_HIER
      HIERARCH key/value card with logical content.
    • INTEGER

      public static final CardType<BigInteger> INTEGER
      Standard key/value card with integer content.
    • INTEGER_HIER

      public static final CardType<BigInteger> INTEGER_HIER
      HIERARCH key/value card with integer content.
    • REAL

      public static final CardType<Double> REAL
      Standard key/value card with floating point content.
    • REAL_HIER

      public static final CardType<Double> REAL_HIER
      HIERARCH key/value card with floating point content.
    • COMPLEX

      public static final CardType<double[]> COMPLEX
      Standard key/value card with complex content.
    • COMPLEX_HIER

      public static final CardType<double[]> COMPLEX_HIER
      HIERARCH key/value card with complex content.
    • COMMENT_OTHER

      public static final CardType<Void> COMMENT_OTHER
      Non-standard comment card (no value indicator).
    • UNKNOWN

      public static final CardType<Void> UNKNOWN
      Catch-all card type - apparently not legal FITS.
    • CARD_TYPES

      public static final List<CardType<?>> CARD_TYPES
      Unmofifiable list of all known card types.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValueClass

      public Class<T> getValueClass()
      Returns the type of values yielded by this CardType.
      Returns:
      value class
    • toCard

      public ParsedCard<T> toCard(String txt80)
      Parses an 80-character string as a FITS header card.
      Parameters:
      txt80 - 80-character string, should be ASCII-clean
      Returns:
      parsed header card of this type, or null if card cannot be parsed as this type