com.esri.core.map.popup
Class PopupNumberFormatValue

java.lang.Object
  extended by com.esri.core.map.popup.PopupFormatValue
      extended by com.esri.core.map.popup.PopupNumberFormatValue

public class PopupNumberFormatValue
extends PopupFormatValue

The PopupNumberFormatValue class extends PopupFormatValue and represents the number format.


Constructor Summary
PopupNumberFormatValue()
          Default constructor for PopupNumberFormatValue
PopupNumberFormatValue(int places, boolean digitSeparator)
          Constructor for PopupNumberFormatValue that sets some formatting values.
 
Method Summary
 String formattedValue(Object value)
          Formats a given number object into a string.
 boolean getDigitSeparator()
          Returns true if grouping is used in this format, false otherwise.
 int getPlaces()
          Returns the maximum number of digits allowed in the fraction portion of a number.
 void setDigitSeparator(boolean digitSeparator)
          Set whether or not grouping will be used in this format.
 void setPlaces(int places)
          Sets the maximum number of digits allowed in the fraction portion of a number.
 
Methods inherited from class com.esri.core.map.popup.PopupFormatValue
fromJson
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupNumberFormatValue

public PopupNumberFormatValue()
Default constructor for PopupNumberFormatValue


PopupNumberFormatValue

public PopupNumberFormatValue(int places,
                              boolean digitSeparator)
Constructor for PopupNumberFormatValue that sets some formatting values.

Parameters:
places - Sets the maximum number of digits allowed in the fraction portion of a number.
digitSeparator - Set whether or not grouping will be used in this format.
Method Detail

getPlaces

public int getPlaces()
Returns the maximum number of digits allowed in the fraction portion of a number.

Returns:
places

setPlaces

public void setPlaces(int places)
Sets the maximum number of digits allowed in the fraction portion of a number.

Parameters:
places - The maximum number of digits allowed in the fraction portion

getDigitSeparator

public boolean getDigitSeparator()
Returns true if grouping is used in this format, false otherwise.

Returns:
true if grouping is used in this format, false otherwise

setDigitSeparator

public void setDigitSeparator(boolean digitSeparator)
Set whether or not grouping will be used in this format.

Parameters:
digitSeparator - True if grouping should be used, false otherwise

formattedValue

public String formattedValue(Object value)
Formats a given number object into a string.

Specified by:
formattedValue in class PopupFormatValue
Parameters:
value - The value to be formatted
Returns:
The value formatted as a Number, represented as a String.


Copyright © 2012. All Rights Reserved.