Package uk.ac.starlink.topcat

## Class MetaColumn

- java.lang.Object
- - uk.ac.starlink.topcat.MetaColumn

-     public abstract class MetaColumn
      extends java.lang.Object

  This class describes columns in a table of metadata. Such columns may be editable, have names, etc.
  See Also:
    `MetaColumnTableModel`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MetaColumn​(java.lang.String name, java.lang.Class clazz)` | Constructs a new MetaColumn with a given name and content class.
    `MetaColumn​(java.lang.String name, java.lang.Class clazz, java.lang.String description)` | Constructs a new MetaColumn with a given name, content class and description.
    `MetaColumn​(uk.ac.starlink.table.ColumnInfo info)` | Constructs a new MetaColumn with a given metadata object.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Class` | `getContentClass()` | Returns the class of which all entries in this column are members.
    `uk.ac.starlink.table.ColumnInfo` | `getInfo()` | Returns the metadata object describing this column.
    `java.lang.String` | `getName()` | Returns the name of this column.
    `abstract java.lang.Object` | `getValue​(int irow)` | Returns the entry at a given row in this column.
    `boolean` | `isEditable​(int irow)` | Indicates whether the entry at a given row in this column can be edited (whether `setValue(int, java.lang.Object)` may be called on `irow`).
    `void` | `setValue​(int irow, java.lang.Object value)` | Sets the value of the entry in this column at a given row.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MetaColumn

          public MetaColumn​(java.lang.String name,
                            java.lang.Class clazz)

      Constructs a new MetaColumn with a given name and content class.
      Parameters:
        `name` - the name of the column
        `clazz` - the Class of which every entry in this column will be a member

    - #### MetaColumn

          public MetaColumn​(java.lang.String name,
                            java.lang.Class clazz,
                            java.lang.String description)

      Constructs a new MetaColumn with a given name, content class and description.
      Parameters:
        `name` - the name of the column
        `clazz` - the Class of which every entry in this column will be a member
        `description` - short textual description of column

    - #### MetaColumn

          public MetaColumn​(uk.ac.starlink.table.ColumnInfo info)

      Constructs a new MetaColumn with a given metadata object.
      Parameters:
        `info` - column metadata

  - ### Method Detail

    - #### getValue

          public abstract java.lang.Object getValue​(int irow)

      Returns the entry at a given row in this column.
      Parameters:
        `irow` - the row for which this column is being queried

    - #### isEditable

          public boolean isEditable​(int irow)

      Indicates whether the entry at a given row in this column can be edited (whether `setValue(int, java.lang.Object)` may be called on `irow`). This class's implementation returns `false`, but it may be overridden by subclasses which permit cell modification.
      Parameters:
        `irow` - the row for which this column is being queried
      Returns:
        whether the entry at `irow` may be written to

    - #### setValue

          public void setValue​(int irow,
                               java.lang.Object value)

      Sets the value of the entry in this column at a given row. This should only be called if `isEditable(int)`(irow) returns true.
      Parameters:
        `irow` - the row whose value in this column is to be set
        `value` - the new value of the entry at `irow`

    - #### getName

          public java.lang.String getName()

      Returns the name of this column.
      Returns:
        name

    - #### getContentClass

          public java.lang.Class getContentClass()

      Returns the class of which all entries in this column are members.
      Returns:
        content class

    - #### getInfo

          public uk.ac.starlink.table.ColumnInfo getInfo()

      Returns the metadata object describing this column.
      Returns:
        column metadata

Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.