Package quadbase.util

Class LogicalFormat

java.lang.Object
quadbase.util.LogicalFormat
All Implemented Interfaces:
IFormat

public class LogicalFormat extends Object implements IFormat
LogicalFormat

Class to format logical/boolean value

  • Field Details

  • Constructor Details

    • LogicalFormat

      public LogicalFormat(int format)
      Create a LogicalFormat instance.
      Parameters:
      format - one of T_F, TRUE_FALSE, YES_NO, Y_N, ONE_ZERO
  • Method Details

    • getFormatType

      public int getFormatType()
      Define quadbase.util.IFormat. Return the type of quadbase.util.IFormat.
      Specified by:
      getFormatType in interface IFormat
      Returns:
      IFormat.LOGICAL
    • format

      public String format(Object obj)
      Define quadbase.util.IFormat. Format the object if it is an instance of Boolean, otherwise call the default toString() method.
      Specified by:
      format in interface IFormat
      Parameters:
      obj - The target object
      Returns:
      Formatted string
    • getformat

      public int getformat()
      Get current format.
      Parameters:
      return - current format
    • setformat

      public void setformat(int format)
      Set logical format.
      Parameters:
      format - new format