About Common Method's Collection

xiaoxiao2021-03-06  28

I used the following small methods in a project (mainly "0" and blank transformation, the formatting of Japanese currency, and the date of the date). If you feel useful for the current or later project, you can consider common Get up. If you write your own code, write a small method for everyone or later, I hope to come out, welcome everyone to criticize, correct. // ************* *********************************************************** ********* / ** * Zero リ リ グ グ グ 空 に 転 * @Param Strmaybezero: "String" オブジェ オブジェ ト * @return blank ス ト グ グ グ "String" オブジェ オブジェ ト * / // ******* *********************************************************** ************************* Private string ZerOStospace (String strmaybezero) {if (strmaybezero! = Null && uriseicommonutil.trim (strmaybezero). Equals ("0")) {return "} Else {returnction strmaybezero;}} // ************************************************* *********************************************************************************************


* @Param Date: "String" オブジェ オブジェ * @Return string Representation "zzz, zzz, zzz, zzz, zz9" Japanese currency * / // ************ *********************************************************** ************ private String setJpCurrency9Format (String strCurrencyValue) {NumberFormat jpFormat = NumberFormat.getIntegerInstance (Locale.JAPAN); return jpFormat.format (Long.parseLong (strCurrencyValue));} // ** *********************************************************** ********************** / ** * Japan currency の フォ フォ マ マ ト 行 い
* @Param Date: "String" オブジェ オブジェ ト * @return String Indicated form "ZZZ, ZZZ, ZZZ, ZZZ, ZZZ" Japanese currency * / // ***************************** ************************************************************************* Private String setjpcurrencyzformat (String strCurrencyValue) {if (! strCurrencyValue = null && UriseiCommonUtil.trim (strCurrencyValue) .equals ( "0")) {return "";} else {return setJpCurrency9Format (strCurrencyValue);}} // ******** ************* *********************************************************** ** / ** * Zero リ リ グ グ グ グ グ 空 配 配 転 転 ト ト ト ト ト ト ト ト ト ト ト ト ト ト ト ト ト ト ト [[[ト [[[[[[[ト ト ト ト [ト ト [[[[[[[ * / // ********************************************************* ************************************* Private String [] [] zerostraraytospace (string [] arraymaybezero {for (int i = 0 i

} // ***************************************************************** **************************** * Japan の currency フォ フォ マ マ ト 行 い * @Param ArrayCurrency: "String [] [ ] 」オブジェ オブジェ ト * @return string [] []: Representation" zzz, zzz, zzz, zzz, zz9 "Japanese currency" String [] [] "オブジェ ト ト * / // ***** *********************************************************** **************************** Private string [] [] setjpcurrency9formatarray (string [] [] arraycurrency) {for (int i = 0; i

转载请注明原文地址:https://www.9cbs.com/read-82524.html

New Post(0)