⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changes

📁 《移动Agent技术》一书的所有章节源代码。
💻
📖 第 1 页 / 共 5 页
字号:
____________
TEXT CHANGES - SortKey

    Renamed class CollationKey.  This keeps the terminology consistent 
with
    the other collation classes.
    
    Added getSourceString method.  This returns the string that this 
    CollationKey represents. This allows the removal of the 
CollatedString 
    class.
    
    Added a toByteArray method that returns a byte[] containing the 
key. 
    
    Changed compareTo method to return int rather than byte.  This 
follows the
    pattern set by java.lang.String.compareTo.
    
____________
TEXT CHANGES - StringCharacterIterator

    Added the following convenience constructor:
    
      public StringCharacterIterator(String text, int begin, int end, 
int pos) 
    
    Renamed startIndex method to getBeginIndex.  Renamed endIndex 
method to
    getEndIndex. These names are consistent with the pattern for 
indicating 
    ranges in strings.
    
    Removed the getText method.  See the change description for 
    CharacterIterator.

____________
TEXT CHANGES - TableCollation

    Renamed class RuleBasedCollator.  It was not clear from the old 
name 
    whether this class actually did collation or simply represented a 
set 
    of collation rules.  The new name makes it clear that the class 
performs 
    string comparisons. It also avoids the impression that this class 
    collates tables.
    
    Renamed getSortKey method to getCollationKey.  See the change 
description 
    for SortKey. 
    
    Removed the getSortKey method that operated on a substring of a 
given 
    String.  A recent change to String.substring makes the substring 
    operation efficient. Users can use String.substring to specify a 
    substring rather than requiring methods to provide substring 
variants. 
    Slimming the API makes it easier to learn.
    
    Removed the compare method that operated on a substring of a given 
String. 
    A recent change to String.substring makes the substring operation
    efficient. Users can use String.substring to specify a substring 
rather 
    than requiring methods to provide substring variants. Slimming the 
API 
    makes it easier to learn.
    
    Changed compare to return an int value instead of a byte value.  
See 
    the change description for Collation.
    
____________
TEXT CHANGES - TextBoundary

    Renamed class to BreakIterator.  This more clearly reflects its 
purpose.
    
    Renamed method nthFromCurrent to next(int). This is a less awkward 
name.
    
    Renamed method nextAfter to following.  This is a less awkward 
name.
    
    Changed the return type of getText to CharacterIterator.  Since
    BreakIterator works in terms of a CharacterIterator it didn't make 
sense
    to return a String.
    
    Renamed getWorkBreak methods to getWordInstance.  Renamed 
getLineBreak
    methods to getLineInstance. Renamed getCharacterBreak methods to
    getCharacterInstance. Renamed getSentenceBreak methods to
    getSentenceInstance.  This follows the naming pattern for factory 
methods.

____________
UTIL CHANGES - Calendar

    Changed the type of the public constants from byte to int.  Changed 
the
    corresponding methods to accept and return ints instead of bytes.  
and
    getDecomposition methods to return int instead of byte.  Although 
the byte
    type provides a small amount of type safety, using ints for 
constants is 
    more in keeping with the rest of the JDK.  The results are:
  
     byte ERA = 0;                  ==>   int ERA = 0;                  
     byte YEAR = 1;                 ==>   int YEAR = 1;                 
     byte MONTH = 2;                ==>   int MONTH = 2;                
     byte WEEKOFYEAR = 3;           ==>   int WEEK_OF_YEAR = 3;         
     byte WEEKOFMONTH = 4;          ==>   int WEEK_OF_MONTH = 4;        
     byte DATE = 5;                 ==>   int DATE = 5;                 
     byte DAYOFMONTH = 5;           ==>   int DAY_OF_MONTH = 5;         
     byte DAYOFYEAR = 6;            ==>   int DAY_OF_YEAR = 6;          
     byte DAYOFWEEK = 7;            ==>   int DAY_OF_WEEK = 7;          
     byte DAYOFWEEKINMONTH = 8;     ==>   int DAY_OF_WEEK_IN_MONTH = 8; 
     byte AMPM = 9;                 ==>   int AM_PM = 9;                
     byte HOUR = 10;                ==>   int HOUR = 10;                
     byte HOUROFDAY = 11;           ==>   int HOUR_OF_DAY = 11;         
     byte MINUTE = 12;              ==>   int MINUTE = 12;              
     byte SECOND = 13;              ==>   int SECOND = 13;              
     byte MILLISECOND = 14;         ==>   int MILLISECOND = 14;         
     byte ZONEOFFSET = 15;          ==>   int ZONE_OFFSET = 15;         
     byte DSTOFFSET = 16;           ==>   int DST_OFFSET = 16;          
     byte FIELDCOUNT = 17;          ==>   int FIELD_COUNT = 17;         
                                           
     int get(byte);                 ==>   int get(int);
     set(byte,int);                 ==>   void set(int,int);
     void clear(byte);              ==>   void clear(int);
     void add(byte,int);            ==>   void add(int,int);     
     void roll(byte,boolean);       ==>   void roll(int,boolean);
     void setFirstDayOfWeek(byte);  ==>   void setFirstDayOfWeek(int);
     void setMinimalDaysInFirstWeek(byte);
                                    ==>   void 
setMinimalDaysInFirstWeek(int);
     int getMinimum(byte);          ==>   int getMinimum(int);         
     int getMaximum(byte);          ==>   int getMaximum(int);         
     int getGreatestMinimum(byte);  ==>   int getGreatestMinimum(int); 
     int getLeastMaximum(byte);     ==>   int getLeastMaximum(int);    
                                               
    
    Renamed getValidationMode to isLenient.  Renamed setValidationMode 
to
    setLenient. These names are more descriptive.
    
    Renamed the getDefault methods to getInstance.  This is in keeping 
with the
    pattern for naming factory methods.

____________
UTIL CHANGES - GregorianCalendar

    Changed the type of the public constants from byte to int.  Changed 
the
    corresponding methods to accept and return ints instead of bytes.  
and
    getDecomposition methods to return int instead of byte.  Although 
the byte
    type provides a small amount of type safety, using ints for 
constants 
    is more in keeping with the rest of the JDK.  The results are:
     
     final byte AD = 0;           ==>      final int AD = 0; 
     final byte BC = 1;           ==>      final int BC = 1; 
    
     void add(byte,int);          ==>      void add(int,int);          
     void roll(byte,boolean);     ==>      void roll(int,boolean);       
     int getMinimum(byte);        ==>      int getMinimum(int);          
     int getMaximum(byte);        ==>      int getMaximum(int);          
     int getGreatestMinimum(byte);==>      int getGreatestMinimum(int);  
     int getLeastMaximum(byte);   ==>      int getLeastMaximum(int);     
                                     
____________
UTIL CHANGES - ResourceBundle

    Renamed getResourceBundle methods to getBundle.  The name
    getResourceBundle was too long and overly redundant.  The new name 
is not
    in keeping with the naming pattern for factory methods.  This is 
because
    the name "getInstance" is being reserved for a future addition to 
the
    resource bundle classes.
    
__________
AWT CHANGE -  Compiling programs that use old AWT API now produces
              deprecation warnings

    In the beta versions of 1.1, the deprecated methods in the AWT were
    marked with simple "DEPRECATED" strings in the method's javadoc
    comment.  For the final release we have added the appropriate
    "@deprecated" tags to those methods so that you can use the
    appropriate compiler option to generate warnings that make it
    easier for you to convert your programs when you desire to do so.

    The document at the following URL describes how to convert to the
    1.1 AWT API.  It also links to a document that lists every 
deprecated
    method and its 1.1 substitute.

    
http://java.sun.com/products/JDK/1.1/docs/guide/awt/HowToUpgrade.html

    RATIONALE:

    The bulk of the AWT deprecations are a result of migrating the AWT
    towards JavaBeans compliance.  In particular, the two areas which
    required a significant number of deprecations were:

    - Properties (location, size, visibility, etc.)
      In order for introspection to be able to programmatically extract
      properties from AWT components, it was necessary to change the
      names of various methods to the JavaBeans getFoo/setFoo pattern.
	
    - New event model
      JavaBeans and the AWT have defined a new delegation-based event
      model for 1.1 which required significant changes to the event
      handling API.
	
    Finally, a small set of deprecated methods were changed to enhance
    the learnability and consistency of the toolkit API.

__________
AWT CHANGE -  Z-ordering changed back to 1.0.2 order
 
    For beta3, the Z-ordering for children in Container instances was
    defined in the documentation to be "back to front".  Because this
    was contrary to the default Z-ordering which existed in 1.0.2 (and
    the beta implementation), for FCS we have corrected the Z-ordering
    specification in containers to be "front to back".

__________
AWT CHANGE -  Changed names of newly-added APIs:

    The following APIs have been renamed ( from old name => to new name 
):

 	AverageScaleFilter	=>	AreaAveragingScaleFilter
 	createScaledImage(...)	=>	getScaledInstance(...)
 	SCALE_AVERAGE		=>	SCALE_AREA_AVERAGING

    RATIONALE:
    The method name was changed to "getScaledInstance(...)" to be
    consistent with the overall philosophy within the Java API where
    factories and derivative constructors should follow the naming
    convention of

		get<Flavor>Instance(...arguments...)

    The term "Average" was not descriptive of the algorithm applied by
    the default smooth scaling filter, so the name of this filter and
    its algorithm were changed to "AreaAveraging" to indicate what
    quantity was being averaged.

__________
AWT CHANGE - Changed dispatchEvent() method and added new method
             dispatchEventImpl()

    The codepath in dispatchEvent() really must be executed for event
    mechanics to work properly in the AWT (hence we made it 
    package-private).  We moved the implementation to a new
    package-private method (dispatchEventImpl()) and then 
    changed dispatchEvent() to be "public final" and have it
    call dispatchEventImpl() internally.

    RATIONALE:
    We have deprecated the 1.0 postEvent()/deliverEvent() methods,
    however the method that replaces those (dispatchEvent()) is
    currently package-private.  This left no options for folks
    porting to the new event model.

__________
AWT CHANGE - Changed capitalization of getId() to getID() in
    java.awt.AWTEvent

    Changed the method name to getID() and provided a deprecated 
version
    for compatibility with the beta versions.

    RATIONALE:
    java.awt.AWTEvent.getID() is named in a manner inconsistent with 
    the equivalent methods in other classes:
	java.awt.MediaTracker.getID()
	java.util.TimeZone.getID()
	sun.rmi.registry.RegistryImpl.getID()
	sun.rmi.transport.DGCImpl.getID()

    Developers have had trouble because they expected the naming to 
    be consistent.  This fixes bug 4027793.

__________
AWT CHANGE - Changed EventQueue to be non-system-specific

  The following changes were made to EventQueue:
  
  1)  Moved the static getEventQueue() method out of EventQueue
      and instead put it in Toolkit with the name 
"getSystemEventQueue()".
      Left the security check in that method, so that applets 
      cannot get access to the system queue instance (see also #3).
  
  2)  Added a public constructor to the EventQueue class such that
      multiple instances of it can be created.  This will allow 
programs
      to create and use the queue generically, as well as enable 
browser
      vendors to implement a queue/dispatch-thread-per-applet model.
  
  3)  Removed the overriding checkAwtEventQueueAccess() method in the 
      AppletSecurityManager such that it will always default to
      invoking lang.SecurityManager.checkAwtEventQueueAccess()
      and will *always* throw a security exception if an applet tries
      to get a handle on the system event queue.
  
  4)  Modified the EventQueue documentation so that it's clear that
      the class is very generic.  All references to a "system
      EventQueue" have been eliminated.

    RATIONALE:
    This allows the implementation of one 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -