You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2015/10/11 23:06:15 UTC

[05/27] logging-log4j2 git commit: javadoc

javadoc


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/80a45f07
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/80a45f07
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/80a45f07

Branch: refs/heads/LOG4J2-1136
Commit: 80a45f07b46928c73d9dc175667e08f699a77aef
Parents: e4ad985
Author: rpopma <rp...@apache.org>
Authored: Sun Oct 4 19:19:34 2015 +0200
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Sun Oct 11 12:40:42 2015 -0700

----------------------------------------------------------------------
 .../core/util/datetime/FixedDateFormat.java     | 37 ++++++++++++++++++++
 1 file changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/80a45f07/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FixedDateFormat.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FixedDateFormat.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FixedDateFormat.java
index e8612b3..60bc75fb 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FixedDateFormat.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FixedDateFormat.java
@@ -98,10 +98,20 @@ public class FixedDateFormat {
             this.escapeCount = escapeCount;
         }
 
+        /**
+         * Returns the full pattern.
+         * 
+         * @return the full pattern
+         */
         public String getPattern() {
             return pattern;
         }
 
+        /**
+         * Returns the date part of the pattern.
+         * 
+         * @return the date part of the pattern
+         */
         public String getDatePattern() {
             return datePattern;
         }
@@ -121,14 +131,30 @@ public class FixedDateFormat {
             return null;
         }
 
+        /**
+         * Returns the length of the resulting formatted date and time strings.
+         * 
+         * @return the length of the resulting formatted date and time strings
+         */
         public int getLength() {
             return pattern.length() - escapeCount;
         }
 
+        /**
+         * Returns the length of the date part of the resulting formatted string.
+         * 
+         * @return the length of the date part of the resulting formatted string
+         */
         public int getDatePatternLength() {
             return getDatePattern() == null ? 0 : getDatePattern().length() - escapeCount;
         }
 
+        /**
+         * Returns the {@code FastDateFormat} object for formatting the date part of the pattern or {@code null} if the
+         * pattern does not have a date part.
+         * 
+         * @return the {@code FastDateFormat} object for formatting the date part of the pattern or {@code null}
+         */
         public FastDateFormat getFastDateFormat() {
             return getDatePattern() == null ? null : FastDateFormat.getInstance(getDatePattern());
         }
@@ -182,10 +208,21 @@ public class FixedDateFormat {
         return type == null ? null : new FixedDateFormat(type);
     }
 
+    /**
+     * Returns a new {@code FixedDateFormat} object for the specified {@code FixedFormat} and a {@code null} TimeZone.
+     * 
+     * @param format the format to use
+     * @return a new {@code FixedDateFormat} object
+     */
     public static FixedDateFormat create(FixedFormat format) {
         return new FixedDateFormat(format);
     }
 
+    /**
+     * Returns the full pattern of the selected fixed format.
+     * 
+     * @return the full date-time pattern
+     */
     public String getFormat() {
         return fixedFormat.getPattern();
     }