org.pentaho.di.core.Const.getNumberFormats()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中org.pentaho.di.core.Const.getNumberFormats()方法的一些代码示例,展示了Const.getNumberFormats()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Const.getNumberFormats()方法的具体详情如下:
包路径:org.pentaho.di.core.Const
类名称:Const
方法名:getNumberFormats

Const.getNumberFormats介绍

[英]Returning the localized number conversion formats. They get created once on first request.
[中]返回本地化的数字转换格式。它们在第一次请求时创建一次。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * @return An array of all default conversion formats, to be used in dialogs etc.
 */
public static String[] getConversionFormats() {
 String[] dats = Const.getDateFormats();
 String[] nums = Const.getNumberFormats();
 int totsize = dats.length + nums.length;
 String[] formats = new String[totsize];
 for ( int x = 0; x < dats.length; x++ ) {
  formats[x] = dats[x];
 }
 for ( int x = 0; x < nums.length; x++ ) {
  formats[dats.length + x] = nums[x];
 }
 return formats;
}

代码示例来源:origin: pentaho/pentaho-kettle

public String[] getComboValues( TableItem tableItem, int rowNr, int colNr ) {
 String[] comboValues = new String[] {};
 int type = ValueMetaFactory.getIdForValueMeta( tableItem.getText( colNr - 1 ) );
 switch ( type ) {
  case ValueMetaInterface.TYPE_DATE:
   comboValues = Const.getDateFormats();
   break;
  case ValueMetaInterface.TYPE_INTEGER:
  case ValueMetaInterface.TYPE_BIGNUMBER:
  case ValueMetaInterface.TYPE_NUMBER:
   comboValues = Const.getNumberFormats();
   break;
  default:
   break;
 }
 return comboValues;
}

代码示例来源:origin: pentaho/pentaho-kettle

public String[] getComboValues( TableItem tableItem, int rowNr, int colNr ) {
 String[] comboValues = new String[] {};
 int type = ValueMetaFactory.getIdForValueMeta( tableItem.getText( colNr - 1 ) );
 switch ( type ) {
  case ValueMetaInterface.TYPE_DATE:
   comboValues = Const.getDateFormats();
   break;
  case ValueMetaInterface.TYPE_INTEGER:
  case ValueMetaInterface.TYPE_BIGNUMBER:
  case ValueMetaInterface.TYPE_NUMBER:
   comboValues = Const.getNumberFormats();
   break;
  default:
   break;
 }
 return comboValues;
}

代码示例来源:origin: pentaho/pentaho-kettle

public String[] getComboValues( TableItem tableItem, int rowNr, int colNr ) {
 String[] comboValues = new String[] {};
 int type = ValueMetaFactory.getIdForValueMeta( tableItem.getText( colNr - 1 ) );
 switch ( type ) {
  case ValueMetaInterface.TYPE_DATE:
   comboValues = Const.getDateFormats();
   break;
  case ValueMetaInterface.TYPE_INTEGER:
  case ValueMetaInterface.TYPE_BIGNUMBER:
  case ValueMetaInterface.TYPE_NUMBER:
   comboValues = Const.getNumberFormats();
   break;
  default:
   break;
 }
 return comboValues;
}

代码示例来源:origin: pentaho/pentaho-kettle

public String[] getComboValues( TableItem tableItem, int rowNr, int colNr ) {
 String[] comboValues = new String[] {};
 int type = ValueMetaFactory.getIdForValueMeta( tableItem.getText( colNr - 1 ) );
 switch ( type ) {
  case ValueMetaInterface.TYPE_DATE:
   comboValues = Const.getDateFormats();
   break;
  case ValueMetaInterface.TYPE_INTEGER:
  case ValueMetaInterface.TYPE_BIGNUMBER:
  case ValueMetaInterface.TYPE_NUMBER:
   comboValues = Const.getNumberFormats();
   break;
  default:
   break;
 }
 return comboValues;
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public String[] getComboValues( TableItem tableItem, int rowNr, int colNr ) {
 String[] comboValues = new String[] { };
 int type = ValueMeta.getType( tableItem.getText( colNr - 1 ) );
 switch ( type ) {
  case ValueMetaInterface.TYPE_DATE:
   comboValues = Const.getDateFormats();
   break;
  case ValueMetaInterface.TYPE_INTEGER:
  case ValueMetaInterface.TYPE_BIGNUMBER:
  case ValueMetaInterface.TYPE_NUMBER:
   comboValues = Const.getNumberFormats();
   break;
  default:
   break;
 }
 return comboValues;
}

代码示例来源:origin: pentaho/pentaho-kettle

private String[] getComboValues( TableItem row, ColumnInfo colinfo ) {
 if ( colinfo.getType() == ColumnInfo.COLUMN_TYPE_FORMAT ) {
  int type = ValueMetaFactory.getIdForValueMeta( row.getText( colinfo.getFieldTypeColumn() ) );
  switch ( type ) {
   case ValueMetaInterface.TYPE_DATE:
    return Const.getDateFormats();
   case ValueMetaInterface.TYPE_INTEGER:
   case ValueMetaInterface.TYPE_BIGNUMBER:
   case ValueMetaInterface.TYPE_NUMBER:
    return Const.getNumberFormats();
   case ValueMetaInterface.TYPE_STRING:
    return Const.getConversionFormats();
   default:
    return new String[0];
  }
 }
 return colinfo.getComboValues();
}

代码示例来源:origin: pentaho/pentaho-kettle

boolean[][] numberFormat = new boolean[nrfields][Const.getNumberFormats().length]; // What are the number format
int[][] numberPrecision = new int[nrfields][Const.getNumberFormats().length]; // remember the precision?
int[][] numberLength = new int[nrfields][Const.getNumberFormats().length]; // remember the length?
 for ( int j = 0; j < Const.getNumberFormats().length; j++ ) {
  numberFormat[i][j] = true;
  minValue[i][j] = Double.MAX_VALUE;
  numberLength[i][j] = -1;
 numberFormatCount[i] = Const.getNumberFormats().length;

代码示例来源:origin: pentaho/pentaho-kettle

boolean[][] numberFormat = new boolean[nrfields][Const.getNumberFormats().length]; // What are the number format
int[][] numberPrecision = new int[nrfields][Const.getNumberFormats().length]; // remember the precision?
int[][] numberLength = new int[nrfields][Const.getNumberFormats().length]; // remember the length?
 for ( int j = 0; j < Const.getNumberFormats().length; j++ ) {
  numberFormat[i][j] = true;
  minValue[i][j] = Double.MAX_VALUE;
  numberLength[i][j] = -1;
 numberFormatCount[i] = Const.getNumberFormats().length;

代码示例来源:origin: pentaho/pentaho-kettle

wFormat.setItems( Const.getNumberFormats() );
int index = ( !Utils.isEmpty( formatString ) ) ? wFormat.indexOf( formatString ) : wFormat.indexOf( "#" );
wFormat.setItems( Const.getNumberFormats() );
index = ( !Utils.isEmpty( formatString ) ) ? wFormat.indexOf( formatString ) : wFormat.indexOf( "#.#" );

代码示例来源:origin: pentaho/pentaho-kettle

String[] nums = Const.getNumberFormats();
int totsize = dats.length + nums.length;
String[] formats = new String[ totsize ];

代码示例来源:origin: pentaho/pentaho-kettle

String[] nums = Const.getNumberFormats();
int totsize = dats.length + nums.length;
String[] formats = new String[totsize];

代码示例来源:origin: pentaho/pentaho-kettle

String[] nums = Const.getNumberFormats();
int totsize = dats.length + nums.length;
String[] formats = new String[totsize];

代码示例来源:origin: pentaho/pentaho-kettle

String[] nums = Const.getNumberFormats();
int totsize = dats.length + nums.length;
String[] formats = new String[totsize];

代码示例来源:origin: pentaho/pentaho-kettle

String[] nums = Const.getNumberFormats();
int totsize = dats.length + nums.length;
String[] formats = new String[totsize];

代码示例来源:origin: pentaho/big-data-plugin

public String[] getComboValues( TableItem tableItem, int rowNr, int colNr ) {
  String[] comboValues = new String[] {};
  int type = ValueMeta.getType( tableItem.getText( colNr - 1 ) );
  switch ( type ) {
   case ValueMetaInterface.TYPE_DATE:
    comboValues = Const.getDateFormats();
    break;
   case ValueMetaInterface.TYPE_INTEGER:
   case ValueMetaInterface.TYPE_BIGNUMBER:
   case ValueMetaInterface.TYPE_NUMBER:
    comboValues = Const.getNumberFormats();
    break;
   default:
    break;
  }
  return comboValues;
 }
} );

代码示例来源:origin: pentaho/big-data-plugin

public String[] getComboValues( TableItem tableItem, int rowNr, int colNr ) {
  String[] comboValues = new String[] {};
  // try to fill in the type
  String alias = tableItem.getText( 1 );
  if ( !Const.isEmpty( alias ) ) {
   setFilterTableTypeColumn( tableItem );
  }
  int type = ValueMeta.getType( tableItem.getText( 2 ) );
  switch ( type ) {
   case ValueMetaInterface.TYPE_DATE:
    comboValues = Const.getDateFormats();
    break;
   case ValueMetaInterface.TYPE_INTEGER:
   case ValueMetaInterface.TYPE_BIGNUMBER:
   case ValueMetaInterface.TYPE_NUMBER:
    comboValues = Const.getNumberFormats();
    break;
   default:
    break;
   // if there is not type information available (no connection and no
   // user-specified
   // columns in the meta class) then the user will just have to type
   // in their own
   // formatting string (if necessary)
  }
  return comboValues;
 }
} );

代码示例来源:origin: pentaho/big-data-plugin

String[] nums = Const.getNumberFormats();
int totsize = dats.length + nums.length;
String[] formats = new String[ totsize ];

代码示例来源:origin: pentaho/big-data-plugin

String[] nums = Const.getNumberFormats();
int totsize = dates.length + nums.length;
String[] formats = new String[totsize];

相关文章

微信公众号

最新文章

更多