Java Doc for UserProperties.java in  » Database-Client » iSQL-Viewer » org » isqlviewer » 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 » Database Client » iSQL Viewer » org.isqlviewer.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.util.Properties
   org.isqlviewer.util.UserProperties

UserProperties
public class UserProperties extends Properties (Code)
TODO Add UserProperties Overview JavaDoc.


author:
   Mark A. Kobold <mkobold at isqlviewer dot com>
version:
   1.0




Constructor Summary
public  UserProperties(Properties defaults)
     Creates new properties object with given defaults.
public  UserProperties()
     Creates new properties object with no defaults.

Method Summary
public  booleancontainsAllKeys(Collection keySet)
     Takes the a list of keys then iterators through the list and validates that all keys are contained as keys with the UserProperties.
final public  booleancontainsKey(Object key)
    
final public  Stringget(String key, String def)
     Returns the String value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a char.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key.

final public  Stringget(String key)
     Returns the String value of the string associated with the specified key.

This returns null as the default value.
Parameters:
  key - key whose associated value is to be returned as a String.

final public  Objectget(Object key)
    
final public  booleangetBoolean(String key, boolean def)
     Returns the boolean value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a double.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a boolean.

final public  booleangetBoolean(String key)
     Returns the boolean value of the string associated with the specified key.

This returns false as the default value.
Parameters:
  key - key whose associated value is to be returned as a boolean.

final public  doublegetDouble(String key, double def)
     Returns the double value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a double.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a float.

final public  doublegetDouble(String key)
     Returns the double value of the string associated with the specified key.

This will use the constant Double.NaN as the default value.
Parameters:
  key - key whose associated value is to be returned as a double.

final public  floatgetFloat(String key, float def)
     Returns the float value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a float.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a float.

final public  floatgetFloat(String key)
     Returns the float value of the string associated with the specified key.

This returns Float.NaN as the default value.
Parameters:
  key - key whose associated value is to be returned as a float.

final public  intgetInt(String key, int def)
     Returns the int value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a int.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as an int.

final public  intgetInt(String key)
     Returns the int value of the string associated with the specified key.

This returns Integer.MIN_VALUE as the default value.
Parameters:
  key - key whose associated value is to be returned as a double.

final public  longgetLong(String key)
     Returns the long value of the string associated with the specified key.

This returns Long.MIN_VALUE as the default value.
Parameters:
  key - key whose associated value is to be returned as a long.

final public  longgetLong(String key, long def)
     Returns the long value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a long.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a long.

protected  ObjectgetObjectProperty(String key)
    
public  StringgetProperty(String key, String defaultValue)
    
public  StringgetProperty(String key)
    
final public  shortgetShort(String key)
     Returns the short value of the string associated with the specified key.

This returns Short.MIN_VALUE as the default value.
Parameters:
  key - key whose associated value is to be returned as a long.

final public  shortgetShort(String key, short def)
     Returns the short value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a short.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a short.

final public  voidput(String key, String value)
     Associates a string representing the specified String value.
final public  Objectput(Object key, Object value)
    
final public  voidputBoolean(String key, boolean value)
     Associates a string representing the specified boolean value.
final public  voidputByte(String key, byte value)
     Sets the byte property with the given key name.
final public  voidputDouble(String key, double value)
     Associates a string representing the specified double value.
final public  voidputFloat(String key, float value)
     Associates a string representing the specified float value.
final public  voidputInt(String key, int value)
     Associates a string representing the specified int value.
final public  voidputLong(String key, long value)
     Associates a string representing the specified long value.
final public  voidputShort(String key, short value)
     Sets the short property with the given key name.
final public synchronized  voidremoveAll(Map map)
     Removes all keys from map.

Takes the keys from map and removes them from this object.

public  StringremoveProperty(String property)
     Removes a property from current mapping.


Parameters:
  property - property name to remove.

final public synchronized  voidrenameProperty(String oldName, String newName)
     Renames an existing property to a new name.
protected  ObjectsetObjectProperty(String key, Object value)
    


Constructor Detail
UserProperties
public UserProperties(Properties defaults)(Code)
Creates new properties object with given defaults.


See Also:   Properties.Properties(java.util.Properties)
Parameters:
  defaults - default properties object to use.




UserProperties
public UserProperties()(Code)
Creates new properties object with no defaults.


See Also:   Properties.Properties





Method Detail
containsAllKeys
public boolean containsAllKeys(Collection keySet)(Code)
Takes the a list of keys then iterators through the list and validates that all keys are contained as keys with the UserProperties.
Parameters:
  keySet - the keyset to validate againist false if the key is not contained



containsKey
final public boolean containsKey(Object key)(Code)



get
final public String get(String key, String def)(Code)
Returns the String value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a char.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key. the String value represented by the string associated with key in this object, or defif the associated value does not exist.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.put(String,String)
See Also:   Properties.getProperty(java.lang.Stringjava.lang.String)




get
final public String get(String key)(Code)
Returns the String value of the string associated with the specified key.

This returns null as the default value.
Parameters:
  key - key whose associated value is to be returned as a String. the String value represented by the string associated with key in this object.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.put(String,String)




get
final public Object get(Object key)(Code)



getBoolean
final public boolean getBoolean(String key, boolean def)(Code)
Returns the boolean value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a double.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a boolean. the boolean value represented by the string associated with key in this object, ordef if the associated value does not exist or cannot be interpreted as a boolean.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putBoolean(String,boolean)
See Also:   UserProperties.get(String,String)




getBoolean
final public boolean getBoolean(String key)(Code)
Returns the boolean value of the string associated with the specified key.

This returns false as the default value.
Parameters:
  key - key whose associated value is to be returned as a boolean. the boolean value represented by the string associated with key in this object.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putBoolean(String,boolean)
See Also:   UserProperties.get(String,String)




getDouble
final public double getDouble(String key, double def)(Code)
Returns the double value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a double.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a float. the double value represented by the string associated with key in this object, or defif the associated value does not exist or cannot be interpreted as a double.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putDouble(String,double)
See Also:   UserProperties.get(String,String)




getDouble
final public double getDouble(String key)(Code)
Returns the double value of the string associated with the specified key.

This will use the constant Double.NaN as the default value.
Parameters:
  key - key whose associated value is to be returned as a double. the double value represented by the string associated with key in this object.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putDouble(String,double)
See Also:   UserProperties.get(String,String)




getFloat
final public float getFloat(String key, float def)(Code)
Returns the float value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a float.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a float. the float value represented by the string associated with key in this object, or defif the associated value does not exist or cannot be interpreted as a float.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putFloat(String,float)
See Also:   UserProperties.get(String,String)




getFloat
final public float getFloat(String key)(Code)
Returns the float value of the string associated with the specified key.

This returns Float.NaN as the default value.
Parameters:
  key - key whose associated value is to be returned as a float. the float value represented by the string associated with key in this object.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putFloat(String,float)
See Also:   UserProperties.get(String,String)




getInt
final public int getInt(String key, int def)(Code)
Returns the int value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a int.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as an int. the boolean value represented by the string associated with key in this object, ordef if the associated value does not exist or cannot be interpreted as an int.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putInt(String,int)
See Also:   UserProperties.get(String,String)




getInt
final public int getInt(String key)(Code)
Returns the int value of the string associated with the specified key.

This returns Integer.MIN_VALUE as the default value.
Parameters:
  key - key whose associated value is to be returned as a double. the int value represented by the string associated with key in this object.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putInt(String,int)
See Also:   UserProperties.get(String,String)




getLong
final public long getLong(String key)(Code)
Returns the long value of the string associated with the specified key.

This returns Long.MIN_VALUE as the default value.
Parameters:
  key - key whose associated value is to be returned as a long. the long value represented by the string associated with key in this object.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putLong(String,long)
See Also:   UserProperties.get(String,String)




getLong
final public long getLong(String key, long def)(Code)
Returns the long value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a long.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a long. the long value represented by the string associated with key in this object, or defif the associated value does not exist or cannot be interpreted as a long.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putLong(String,long)
See Also:   UserProperties.get(String,String)




getObjectProperty
protected Object getObjectProperty(String key)(Code)



getProperty
public String getProperty(String key, String defaultValue)(Code)



getProperty
public String getProperty(String key)(Code)



getShort
final public short getShort(String key)(Code)
Returns the short value of the string associated with the specified key.

This returns Short.MIN_VALUE as the default value.
Parameters:
  key - key whose associated value is to be returned as a long. the short value represented by the string associated with key in this object.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putShort(String,short)
See Also:   UserProperties.get(String,String)




getShort
final public short getShort(String key, short def)(Code)
Returns the short value of the string associated with the specified key.


Parameters:
  key - key whose associated value is to be returned as a short.
Parameters:
  def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a short. the long value represented by the string associated with key in this object, or defif the associated value does not exist or cannot be interpreted as a short.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.putShort(String,short)
See Also:   UserProperties.get(String,String)




put
final public void put(String key, String value)(Code)
Associates a string representing the specified String value.


Parameters:
  key - key with which the string form of value is to be associated.
Parameters:
  value - value whose String form is to be associated with key.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.get(String,String)




put
final public Object put(Object key, Object value)(Code)



putBoolean
final public void putBoolean(String key, boolean value)(Code)
Associates a string representing the specified boolean value.


Parameters:
  key - key with which the string form of value is to be associated.
Parameters:
  value - value whose boolean form is to be associated with key.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.getBoolean(String,boolean)




putByte
final public void putByte(String key, byte value)(Code)
Sets the byte property with the given key name.


Parameters:
  key - key with which the string form of value is to be associated.
Parameters:
  value - value whose byte form is to be associated with key.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.getShort(String,short)




putDouble
final public void putDouble(String key, double value)(Code)
Associates a string representing the specified double value.


Parameters:
  key - key with which the string form of value is to be associated.
Parameters:
  value - value whose double form is to be associated with key.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.getDouble(String,double)




putFloat
final public void putFloat(String key, float value)(Code)
Associates a string representing the specified float value.


Parameters:
  key - key with which the string form of value is to be associated.
Parameters:
  value - value whose float form is to be associated with key.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.getFloat(String,float)




putInt
final public void putInt(String key, int value)(Code)
Associates a string representing the specified int value.


Parameters:
  key - key with which the string form of value is to be associated.
Parameters:
  value - value whose int form is to be associated with key.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.getInt(String,int)




putLong
final public void putLong(String key, long value)(Code)
Associates a string representing the specified long value.


Parameters:
  key - key with which the string form of value is to be associated.
Parameters:
  value - value whose long form is to be associated with key.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.getLong(String,long)




putShort
final public void putShort(String key, short value)(Code)
Sets the short property with the given key name.


Parameters:
  key - key with which the string form of value is to be associated.
Parameters:
  value - value whose long form is to be associated with key.
throws:
  NullPointerException - if key is null.
See Also:   UserProperties.getShort(String,short)




removeAll
final public synchronized void removeAll(Map map)(Code)
Removes all keys from map.

Takes the keys from map and removes them from this object. In terms of set theory the properties are removed by the intersection of the given map and this object.
Parameters:
  map - map that contains the keys to removes.




removeProperty
public String removeProperty(String property)(Code)
Removes a property from current mapping.


Parameters:
  property - property name to remove. property as a string, null if the property does not exist.




renameProperty
final public synchronized void renameProperty(String oldName, String newName)(Code)
Renames an existing property to a new name.


Parameters:
  oldName - the old property name to change.
Parameters:
  newName - property name to change the oldName to.




setObjectProperty
protected Object setObjectProperty(String key, Object value)(Code)



Fields inherited from java.util.Properties
protected Properties defaults(Code)(Java Doc)

Methods inherited from java.util.Properties
public String getProperty(String key)(Code)(Java Doc)
public String getProperty(String key, String defaultValue)(Code)(Java Doc)
public void list(PrintStream out)(Code)(Java Doc)
public void list(PrintWriter out)(Code)(Java Doc)
public synchronized void load(Reader reader) throws IOException(Code)(Java Doc)
public synchronized void load(InputStream inStream) throws IOException(Code)(Java Doc)
public synchronized void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException(Code)(Java Doc)
public Enumeration propertyNames()(Code)(Java Doc)
public synchronized void save(OutputStream out, String comments)(Code)(Java Doc)
public synchronized Object setProperty(String key, String value)(Code)(Java Doc)
public void store(Writer writer, String comments) throws IOException(Code)(Java Doc)
public void store(OutputStream out, String comments) throws IOException(Code)(Java Doc)
public synchronized void storeToXML(OutputStream os, String comment) throws IOException(Code)(Java Doc)
public synchronized void storeToXML(OutputStream os, String comment, String encoding) throws IOException(Code)(Java Doc)
public Set<String> stringPropertyNames()(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.