Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
  
  
    
    
    
    
    abstract class UFormat : Format
    
    
    
      
        
          | Known Indirect Subclasses
              
              
             | 
      
    
    An abstract class that extends java.text.Format to provide additional ICU protocol, specifically, the getLocale() API. All ICU format classes are subclasses of this class.
    Summary
    
      
        
          | Public constructors | 
        
          | Default constructor. | 
      
    
    
      
        
          | Inherited functions | 
        
          | From class Format
                
                  
                    | Any | clone()
                         Creates and returns a copy of this object. |  
                    | String! | format(obj: Any!)
                         Formats an object to produce a string. This is equivalent to  format(obj, new StringBuffer(), new FieldPosition(0)).toString(); |  
                    | StringBuffer! | format(obj: Any!, toAppendTo: StringBuffer!, pos: FieldPosition!)
                         Formats an object and appends the resulting text to a given string buffer. If the posargument identifies a field used by the format, then its indices are set to the beginning and end of the first such field encountered. |  
                    | AttributedCharacterIterator! | formatToCharacterIterator(obj: Any!)
                         Formats an Object producing an AttributedCharacterIterator. You can use the returnedAttributedCharacterIteratorto build the resulting String, as well as to determine information about the resulting String.  Each attribute key of the AttributedCharacterIterator will be of type Field. It is up to eachFormatimplementation to define what the legal values are for each attribute in theAttributedCharacterIterator, but typically the attribute key is also used as the attribute value. The default implementation creates an AttributedCharacterIteratorwith no attributes. Subclasses that support fields should override this and create anAttributedCharacterIteratorwith meaningful attributes. |  
                    | Any! | parseObject(source: String!)
                         Parses text from the beginning of the given string to produce an object. The method may not use the entire text of the given string. |  
                    | Any! | parseObject(source: String!, pos: ParsePosition!)
                         Parses text from a string to produce an object.   The method attempts to parse text starting at the index given by pos. If parsing succeeds, then the index ofposis updated to the index after the last character used (parsing does not necessarily use all characters up to the end of the string), and the parsed object is returned. The updatedposcan be used to indicate the starting point for the next call to this method. If an error occurs, then the index ofposis not changed, the error index ofposis set to the index of the character where the error occurred, and null is returned. |  | 
      
    
    Public constructors
    
      
      
      UFormat()
      Default constructor.
     
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [null,null,["Last updated 2025-02-10 UTC."],[],[]]