Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.util
Interface RuntimeInfo

    public interface RuntimeInfo

This interface saves some runtime properties of engine for generating correct results.

Method Summary
`boolean` | `equals(java.lang.Object o)` Compares the specified object with this runtime info for equality.
`java.lang.String` | `getExportStyleGroup()` Get export style group;
`int` | `hashCode()` Returns the hash code value for this runtime info.
`boolean` | `isHighPrecision()` Checks the precision of RuntimeInfo.
`void` | `setExportStyleGroup(java.lang.String styleGroup)` Set export style group to this info.
`void` | `setHighPrecision(boolean highPrecision)` Sets the precision for Runtimeinfo.

Method Detail

### setHighPrecision

    void setHighPrecision(boolean highPrecision)

  Sets the precision for Runtimeinfo. The high precision result files refer to PDF, RTF, Excel, Fax, and PS; and the low precision result files refer to DHTML, HTML, Applet, XML, and Text. You can also select high or low precision when exporting to RST and RSD.

  Parameters:
    `highPrecision` - if true, use high precision; if false, use low precision.

### isHighPrecision

    boolean isHighPrecision()

  Checks the precision of RuntimeInfo.

  Returns:
    true if it is high precision, and false if it is low precision.

### setExportStyleGroup

    void setExportStyleGroup(java.lang.String styleGroup)

  Set export style group to this info.

  Parameters:
    `styleGroup` - export style group.

### getExportStyleGroup

    java.lang.String getExportStyleGroup()

  Get export style group;

  Returns:
    export style group;

### equals

    boolean equals(java.lang.Object o)

  Compares the specified object with this runtime info for equality. Returns `true` if and only if the specified object is also a runtime info, both runtime info have the equal infos include all infos in runtime info (Two infos `info1` and `info2` are equal if result of following calculation is `ture`

              boolean result = true;
              if ( isPrimitive(info1) ){
                      switch ( info.type ){
                              case boolean:
                              case byte:
                              case char:
                              case int:
                              case short:
                                      result = info1 == info2;
                                      break;
                              case double:
                                      result = new Double(info1).equals(new Double(info2));
                                      break;
                              case float:
                                      result = new Float(info1).equals(new Float(info2));
                                      break;
                              case long:
                                      result = new Long(info1).equals(new Long(info2));
                                      break;
                              default :
                      }
              }else{
                      if ( info1 is exportStyle {
                              if ( "".equals(info1) ) info1 = null;
                              if ( "".equals(info2) ) info2 = null;
                      }
                      result = info1 == null? (info2 == null): info1.equals(info2);
              }

  In other words, two runtime infos are defined to be equal if they contain the equal infos. This definition ensures that the equals method works properly across different implementations of the `RuntimeInfo` interface.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `o` - the object to be compared for equality with this runtime info.
  Returns:
    `true` if the specified object is equal to this runtime info.

### hashCode

    int hashCode()

  Returns the hash code value for this runtime info. The hash code of a runtime info is defined to be the result of the following calculation:

              hashCode = 0;
              for ( each info ){
                      int c = 0;
                      if (isPrimitive(info)){
                              switch info.type{
                                      case boolean:
                                              c = info? 0: 1;
                                              break;
                                      case byte:
                                      case char:
                                      case int:
                                      case short:
                                              c = info;
                                              break;
                                      case double:
                                              c = new Double(info).hashCode();
                                              break;
                                      case float:
                                              c = new Float(info).hashCode();
                                              break;
                                      case long:
                                              c = new Long(info).hashCode();
                                              break;
                                      default :
                              }
                      }else{
                              if ( info is exportStyle && "".equals(info) ) info = null;
                              c = info == null? 0: info.hashCode();
                      }
                      hashCode ^= c;
              }

  This ensures that `info1.equals(info2)` implies that `info1.hashCode()==info2.hashCode()` for any two infos, `info1` and `info2`, as required by the general contract of `Object.hashCode`.

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    the hash code value for this runtime info.
  See Also:
    `Object.hashCode()`, `Object.equals(Object)`, `equals(Object)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD