| getCurrencyInstance() | ใช้สร้าง object number format ที่มีการจัดรูปแบบตัวเลขให้เป็น ค่าเงิน ตามที่ระบบเครื่องตั้งไว้ |
|---|---|
| getCurrencyInstance( object_locale ) | ใช้สร้าง object number format ที่มีการจัดรูปแบบตัวเลขให้เป็น ค่าเงิน ตามที่กำหนด |
| getPercentInstance() | ใช้สร้าง object number format ที่มีการจัดรูปแบบตัวเลขให้เป็น เปอร์เซ็นต์ ตามที่ระบบเครื่องตั้งไว้ |
| getPercentInstance( object_locale ) | ใช้สร้าง object number format ที่มีการจัดรูปแบบตัวเลขให้เป็น เปอร์เซ็นต์ ตามที่กำหนด |
| getNumberInstance() | ใช้สร้าง object number format โดยจะใช้จัดรูปแบบตัวเลข ตามต้องการ |
| getNumberInstance( object_locale ) | ใช้สร้าง object number format โดยจะใช้จัดรูปแบบตัวเลข ตามต้องการ |
| setMaximumFractionDigits() | ใช้กำหนด จำนวนสูงสุดของทศนิยม |
| setMinimumFractionDigits() | ใช้กำหนด จำนวนต่ำสุดของทศนิยม ( อย่างน้อย ) |
| format() | ใช้คืนค่าข้อมูลที่ได้หลังจากการจัดรูปแบบ |
method:getCurrencyInstance ();
return type:NumberFornat
special:static
content:ใช้สร้าง object number format ที่มีการจัดรูปแบบตัวเลขให้เป็น ค่าเงิน ตามที่ระบบเครื่องตั้งไว้
example:NumberFormat number_format = NumberFormat.getCurrencyInstance ();
method:getCurrencyInstance ( object_locale );
return type:NumberFornat
special:static
content:ใช้สร้าง object number format ที่มีการจัดรูปแบบตัวเลขให้เป็น ค่าเงิน ตามที่กำหนด
example:Locale locale = new Locale ( "th", "TH" ); NumberFormat number_format = NumberFormat.getCurrencyInstance ( locale );
method:getPercentInstance ();
return type:NumberFornat
special:static
content:ใช้สร้าง object number format ที่มีการจัดรูปแบบตัวเลขให้เป็น เปอร์เซ็นต์ ตามที่ระบบเครื่องตั้งไว้
example:NumberFormat number_format = NumberFormat.getPercentInstance ();
method:getPercentInstance ( object_locale );
return type:NumberFornat
special:static
content:ใช้สร้าง object number format ที่มีการจัดรูปแบบตัวเลขให้เป็น เปอร์เซ็นต์ ตามที่กำหนด
example:Locale locale = new Locale ( "th", "TH" ); NumberFormat number_format = NumberFormat.getPercentInstance ( locale );
method:getNumberInstance ();
return type:NumberFornat
special:static
content:ใช้สร้าง object number format โดยจะใช้จัดรูปแบบตัวเลข ตามต้องการ
example:NumberFormat number_format = NumberFormat.getNumberInstance ();
method:getNumberInstance ( object_locale );
return type:NumberFornat
special:static
content:ใช้สร้าง object number format โดยจะใช้จัดรูปแบบตัวเลข ตามต้องการ
example:Locale locale = new Locale ( "th", "TH" ); NumberFormat number_format = NumberFormat.getNumberInstance ( locale );
method:setMaximumFractionDigits ( num );
return type:void
content:ใช้กำหนด จำนวนสูงสุดของทศนิยม
example:NumberFormat number_format = NumberFormat.getNumberInstance (); number_format.setMaximumFractionDigits ( 5 );
method:setMinimumFractionDigits ( num );
return type:void
content:ใช้กำหนด จำนวนต่ำสุดของทศนิยม ( อย่างน้อย )
example:NumberFormat number_format = NumberFormat.getNumberInstance (); number_format.setMinimumFractionDigits ( 5 );
method:format ( number );
return type:String
content:ใช้คืนค่าข้อมูลที่ได้หลังจากการจัดรูปแบบ
example:NumberFormat number_format = NumberFormat.getNumberInstance (); number_format.setMaximumFractionDigits ( 5 ); number_format.setMinimumFractionDigits ( 5 ); System.out.println ( number_format.format ( 2500 ) );