diff options
author | Mark Wielaard <mark@gcc.gnu.org> | 2006-01-17 18:09:40 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2006-01-17 18:09:40 +0000 |
commit | 2127637945ea6b763966398130e0770fa993c860 (patch) | |
tree | c976ca91e3ef0bda3b34b37c0195145638d8d08e /libjava/classpath/javax/print/attribute/TextSyntax.java | |
parent | bcb36c3e02e3bd2843aad1b9888513dfb5d6e337 (diff) | |
download | gcc-2127637945ea6b763966398130e0770fa993c860.zip gcc-2127637945ea6b763966398130e0770fa993c860.tar.gz gcc-2127637945ea6b763966398130e0770fa993c860.tar.bz2 |
Imported GNU Classpath 0.20
Imported GNU Classpath 0.20
* Makefile.am (AM_CPPFLAGS): Add classpath/include.
* java/nio/charset/spi/CharsetProvider.java: New override file.
* java/security/Security.java: Likewise.
* sources.am: Regenerated.
* Makefile.in: Likewise.
From-SVN: r109831
Diffstat (limited to 'libjava/classpath/javax/print/attribute/TextSyntax.java')
-rw-r--r-- | libjava/classpath/javax/print/attribute/TextSyntax.java | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/libjava/classpath/javax/print/attribute/TextSyntax.java b/libjava/classpath/javax/print/attribute/TextSyntax.java index 98fabdc..2daab6e 100644 --- a/libjava/classpath/javax/print/attribute/TextSyntax.java +++ b/libjava/classpath/javax/print/attribute/TextSyntax.java @@ -1,5 +1,5 @@ /* TextSyntax.java -- - Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -41,7 +41,14 @@ import java.io.Serializable; import java.util.Locale; /** - * @author Michael Koch + * <code>TextSyntax</code> is the abstract base class of all attribute + * classes which provide a string as value (e.g. the location of the printer). + * <p> + * A <code>TextSyntax</code> instance consists of a string value and a + * locale which indicates the language of the locale of the string. + * </p> + * + * @author Michael Koch (konqueror@gmx.de) */ public abstract class TextSyntax implements Cloneable, Serializable { @@ -55,23 +62,24 @@ public abstract class TextSyntax implements Cloneable, Serializable * and locale. * * @param value the value for this syntax - * @param locale the locale to use + * @param locale the locale to use, if <code>null</code> the default + * locale is used. * - * @exception NullPointerException if value and/or locale is null + * @exception NullPointerException if value is null */ protected TextSyntax(String value, Locale locale) { - if (value == null || locale == null) - throw new NullPointerException("value and/or locale may not be null"); - + if (value == null) + throw new NullPointerException("value may not be null"); + this.value = value; - this.locale = locale; + this.locale = (locale == null ? Locale.getDefault() : locale); } /** * Returns the value of this syntax object. * - * @return the value + * @return The value. */ public String getValue() { @@ -81,7 +89,7 @@ public abstract class TextSyntax implements Cloneable, Serializable /** * Returns the locale of this syntax object. * - * @return the locale + * @return The locale. */ public Locale getLocale() { @@ -91,7 +99,7 @@ public abstract class TextSyntax implements Cloneable, Serializable /** * Returns the hashcode for this object. * - * @return the hashcode + * @return The hashcode. */ public int hashCode() { @@ -99,7 +107,7 @@ public abstract class TextSyntax implements Cloneable, Serializable } /** - * Tests of obj is equal to this object. + * Tests if the given object is equal to this object. * * @param obj the object to test * @@ -117,7 +125,10 @@ public abstract class TextSyntax implements Cloneable, Serializable } /** - * Returns a string representing the object. + * Returns a string representing the object. The returned + * string is the underlying text value of this object. + * + * @return The string representation. */ public String toString() { |