# Class CAFormatterPretty

java.lang.Object
com.io7m.cardant.shell.internal.formatting.CAFormatterPretty

All Implemented Interfaces:
  `CAFormatterType`

public final class CAFormatterPretty extends Object implements CAFormatterType
A pretty formatter.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CAFormatterPretty(org.jline.terminal.Terminal inTerminal)`
  A pretty formatter.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `formatAuditPage(CAPage<CAAuditEvent> page)`
  Format a page of audit events.
  `void`
  `formatBookmarks(List<CAPreferenceServerBookmark> bookmarks)`
  Format a list of bookmarks.
  `void`
  `formatFile(CAFileType file)`
  Format a file.
  `void`
  `formatFilesPage(CAPage<CAFileType.CAFileWithoutData> files)`
  Format a page of file summaries.
  `void`
  `formatItem(CAItem item)`
  Format an item.
  `void`
  `formatItemsPage(CAPage<CAItemSummary> items)`
  Format a page of item summaries.
  `void`
  `formatLocation(CALocation location)`
  Format a location.
  `void`
  `formatRoles(Set<com.io7m.medrina.api.MRoleName> roles)`
  Format a list of roles.
  `void`
  `formatStock(CAStockOccurrenceType item)`
  Format a stock occurrence.
  `void`
  `formatStockPage(CAPage<CAStockOccurrenceType> page)`
  Format a page of stock occurrences.
  `void`
  `formatStringSet(SortedSet<String> set)`
  Format a string set.
  `void`
  `formatTypeDeclaration(CATypeRecord type)`
  Format a type declaration.
  `void`
  `formatTypeDeclarationPage(CAPage<CATypeRecordSummary> types)`
  Format a page of types.
  `void`
  `formatTypePackagePage(CAPage<CATypePackageSummary> page)`
  Format a page of type packages.
  `void`
  `formatTypesScalar(Set<CATypeScalarType> types)`
  Format a set of scalar types.
  `void`
  `formatTypesScalarPage(CAPage<CATypeScalarType> types)`
  Format a page of scalar types.
  `void`
  `print(String text)`
  Print text to the output.
  `void`
  `printLine(String text)`
  Print text to the output with a newline.
  `String`
  `toString()`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### CAFormatterPretty

    public CAFormatterPretty(org.jline.terminal.Terminal inTerminal)
    A pretty formatter.
    Parameters:
      `inTerminal` - The terminal

- ## Method Details

  - ### formatFile

    public void formatFile(CAFileType file) throws com.io7m.tabla.core.TException
    Description copied from interface: `CAFormatterType`
    Format a file.
    Specified by:
      `formatFile` in interface `CAFormatterType`
    Parameters:
      `file` - the file
    Throws:
      `com.io7m.tabla.core.TException`

  - ### formatFilesPage

    public void formatFilesPage(CAPage<CAFileType.CAFileWithoutData> files) throws com.io7m.tabla.core.TException
    Description copied from interface: `CAFormatterType`
    Format a page of file summaries.
    Specified by:
      `formatFilesPage` in interface `CAFormatterType`
    Parameters:
      `files` - The page
    Throws:
      `com.io7m.tabla.core.TException`

  - ### formatItem

    public void formatItem(CAItem item) throws com.io7m.tabla.core.TException
    Description copied from interface: `CAFormatterType`
    Format an item.
    Specified by:
      `formatItem` in interface `CAFormatterType`
    Parameters:
      `item` - The item
    Throws:
      `com.io7m.tabla.core.TException`

  - ### formatItemsPage

    public void formatItemsPage(CAPage<CAItemSummary> items) throws com.io7m.tabla.core.TException
    Description copied from interface: `CAFormatterType`
    Format a page of item summaries.
    Specified by:
      `formatItemsPage` in interface `CAFormatterType`
    Parameters:
      `items` - The items
    Throws:
      `com.io7m.tabla.core.TException`

  - ### formatBookmarks

    public void formatBookmarks(List<CAPreferenceServerBookmark> bookmarks) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a list of bookmarks.
    Specified by:
      `formatBookmarks` in interface `CAFormatterType`
    Parameters:
      `bookmarks` - The bookmarks
    Throws:
      `Exception` - On errors

  - ### formatRoles

    public void formatRoles(Set<com.io7m.medrina.api.MRoleName> roles) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a list of roles.
    Specified by:
      `formatRoles` in interface `CAFormatterType`
    Parameters:
      `roles` - The roles
    Throws:
      `Exception` - On errors

  - ### formatTypesScalar

    public void formatTypesScalar(Set<CATypeScalarType> types) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a set of scalar types.
    Specified by:
      `formatTypesScalar` in interface `CAFormatterType`
    Parameters:
      `types` - The types
    Throws:
      `Exception` - On errors

  - ### formatTypesScalarPage

    public void formatTypesScalarPage(CAPage<CATypeScalarType> types) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a page of scalar types.
    Specified by:
      `formatTypesScalarPage` in interface `CAFormatterType`
    Parameters:
      `types` - The types
    Throws:
      `Exception` - On errors

  - ### formatTypeDeclaration

    public void formatTypeDeclaration(CATypeRecord type) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a type declaration.
    Specified by:
      `formatTypeDeclaration` in interface `CAFormatterType`
    Parameters:
      `type` - The type
    Throws:
      `Exception` - On errors

  - ### formatTypeDeclarationPage

    public void formatTypeDeclarationPage(CAPage<CATypeRecordSummary> types) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a page of types.
    Specified by:
      `formatTypeDeclarationPage` in interface `CAFormatterType`
    Parameters:
      `types` - The types
    Throws:
      `Exception` - On errors

  - ### formatLocation

    public void formatLocation(CALocation location) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a location.
    Specified by:
      `formatLocation` in interface `CAFormatterType`
    Parameters:
      `location` - The location
    Throws:
      `Exception` - On errors

  - ### formatAuditPage

    public void formatAuditPage(CAPage<CAAuditEvent> page) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a page of audit events.
    Specified by:
      `formatAuditPage` in interface `CAFormatterType`
    Parameters:
      `page` - The page
    Throws:
      `Exception` - On errors

  - ### print

    public void print(String text)
    Description copied from interface: `CAFormatterType`
    Print text to the output.
    Specified by:
      `print` in interface `CAFormatterType`
    Parameters:
      `text` - The text

  - ### printLine

    public void printLine(String text)
    Description copied from interface: `CAFormatterType`
    Print text to the output with a newline.
    Specified by:
      `printLine` in interface `CAFormatterType`
    Parameters:
      `text` - The text

  - ### formatTypePackagePage

    public void formatTypePackagePage(CAPage<CATypePackageSummary> page) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a page of type packages.
    Specified by:
      `formatTypePackagePage` in interface `CAFormatterType`
    Parameters:
      `page` - The type packages
    Throws:
      `Exception` - On errors

  - ### formatStringSet

    public void formatStringSet(SortedSet<String> set) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a string set.
    Specified by:
      `formatStringSet` in interface `CAFormatterType`
    Parameters:
      `set` - The strings
    Throws:
      `Exception` - On errors

  - ### formatStockPage

    public void formatStockPage(CAPage<CAStockOccurrenceType> page) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a page of stock occurrences.
    Specified by:
      `formatStockPage` in interface `CAFormatterType`
    Parameters:
      `page` - The page
    Throws:
      `Exception` - On errors

  - ### formatStock

    public void formatStock(CAStockOccurrenceType item) throws Exception
    Description copied from interface: `CAFormatterType`
    Format a stock occurrence.
    Specified by:
      `formatStock` in interface `CAFormatterType`
    Parameters:
      `item` - The item
    Throws:
      `Exception` - On errors

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`