Java Doc for GrowableInternationalString.java in  » GIS » GeoTools-2.4.1 » org » geotools » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.util.AbstractInternationalString
      org.geotools.util.GrowableInternationalString

GrowableInternationalString
public class GrowableInternationalString extends AbstractInternationalString implements Serializable(Code)
An implementation of international string using a of strings for different . Strings for new locales can be , but existing strings can't be removed or modified. This behavior is a compromise between making constructionss easier, and being suitable for use in immutable objects.
since:
   2.1
version:
   $Id: GrowableInternationalString.java 27848 2007-11-12 13:10:32Z desruisseaux $
author:
   Martin Desruisseaux



Constructor Summary
public  GrowableInternationalString()
     Constructs an initially empty international string.
public  GrowableInternationalString(String string)
     Constructs an international string initialized with the specified string. Additional localized strings can been added using one of GrowableInternationalString.add add(...) methods.

Method Summary
public synchronized  voidadd(Locale locale, String string)
     Add a string for the given locale.
public  booleanadd(String prefix, String key, String string)
     Add a string for the given property key.
public  booleanequals(Object object)
     Compares this international string with the specified object for equality.
public  SetgetLocales()
     Returns the set of locales defined in this international string.
public  inthashCode()
     Returns a hash code value for this international text.
public  booleanisSubsetOf(Object candidate)
     Returns true if all localized texts stored in this international string are contained in the specified object.
public  StringtoString(Locale locale)
     Returns a string in the specified locale.


Constructor Detail
GrowableInternationalString
public GrowableInternationalString()(Code)
Constructs an initially empty international string. Localized strings can been added using one of GrowableInternationalString.add add(...) methods.



GrowableInternationalString
public GrowableInternationalString(String string)(Code)
Constructs an international string initialized with the specified string. Additional localized strings can been added using one of GrowableInternationalString.add add(...) methods. The string specified to this constructor is the one that will be returned if no localized string is found for the Locale argument in a call to GrowableInternationalString.toString(Locale) .
Parameters:
  string - The string in no specific locale.




Method Detail
add
public synchronized void add(Locale locale, String string) throws IllegalArgumentException(Code)
Add a string for the given locale.
Parameters:
  locale - The locale for the string value, or null .
Parameters:
  string - The localized string.
throws:
  IllegalArgumentException - if a different string value was already set forthe given locale.



add
public boolean add(String prefix, String key, String string) throws IllegalArgumentException(Code)
Add a string for the given property key. This is a convenience method for constructing an AbstractInternationalString during iteration through the in a Map . It infers the Locale from the property key , using the following steps:
  • If the key do not starts with the specified prefix , then this method do nothing and returns false .
  • Otherwise, the characters after the prefix are parsed as an ISO language and country code, and the GrowableInternationalString.add(Locale,String) method is invoked.

For example if the prefix is "remarks", then the "remarks_fr" property key stands for remarks in while the "remarks_fr_CA" property key stands for remarks in .


Parameters:
  prefix - The prefix to skip at the begining of the key .
Parameters:
  key - The property key.
Parameters:
  string - The localized string for the specified key . true if the key has been recognized, or false otherwise.
throws:
  IllegalArgumentException - if the locale after the prefix is an illegal code, or adifferent string value was already set for the given locale.



equals
public boolean equals(Object object)(Code)
Compares this international string with the specified object for equality.



getLocales
public Set getLocales()(Code)
Returns the set of locales defined in this international string.



hashCode
public int hashCode()(Code)
Returns a hash code value for this international text.



isSubsetOf
public boolean isSubsetOf(Object candidate)(Code)
Returns true if all localized texts stored in this international string are contained in the specified object. More specifically:
  • If candidate is an instance of InternationalString , then this method returns true if, for all - pairs contained in this , candidate. (locale) returns a string to string .

  • If candidate is an instance of CharSequence , then this method returns true if GrowableInternationalString.toString(Locale) returns a string to candidate. for all locales.

  • If candidate is an instance of Map , then this methods returns true if all - pairs are contained into candidate .

  • Otherwise, this method returns false .


since:
   2.3



toString
public String toString(Locale locale)(Code)
Returns a string in the specified locale. If there is no string for the specified locale , then this method search for a locale without the part. If no string are found, then this method search for a locale without the part. For example if the "fr_CA" locale was requested but not found, then this method looks for the "fr" locale. The null locale (which stand for unlocalized message) is tried last.
Parameters:
  locale - The locale to look for, or null . The string in the specified locale, or in a default locale.



Fields inherited from org.geotools.util.AbstractInternationalString
transient String defaultValue(Code)(Java Doc)

Methods inherited from org.geotools.util.AbstractInternationalString
public char charAt(int index) throws IndexOutOfBoundsException(Code)(Java Doc)
public int compareTo(Object object)(Code)(Java Doc)
static void ensureNonNull(String name, Object object) throws IllegalArgumentException(Code)(Java Doc)
public int length()(Code)(Java Doc)
public CharSequence subSequence(int start, int end)(Code)(Java Doc)
abstract public String toString(Locale locale)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.