]> source.dussan.org Git - poi.git/commitdiff
javadocs fixes (jdk8)
authorAndreas Beeker <kiwiwings@apache.org>
Tue, 5 Jul 2016 22:57:50 +0000 (22:57 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Tue, 5 Jul 2016 22:57:50 +0000 (22:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751568 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/record/DBCellRecord.java
src/java/org/apache/poi/hssf/record/DVALRecord.java
src/java/org/apache/poi/hssf/record/EndSubRecord.java
src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java
src/java/org/apache/poi/hssf/record/ExternSheetRecord.java
src/java/org/apache/poi/hssf/record/ExternalNameRecord.java

index 499c6cbe7109237f5ee30ec2ea3c1f58dc1a500c..c4080f0ad2f5e7a011a03c1e120ffed883104a2a 100644 (file)
@@ -100,8 +100,13 @@ public final class DBCellRecord extends StandardRecord implements Cloneable {
     }
     
     /**
-     *  @return the size of the group of <tt>DBCellRecord</tt>s needed to encode
-     *  the specified number of blocks and rows
+     * @param nBlocks number of blocks
+     * @param nRows number of rows
+     * 
+     * @return the size of the group of <tt>DBCellRecord</tt>s needed to encode
+     *         the specified number of blocks and rows
+     * 
+     * @deprecated in POI 3.15-beta2, scheduled for removal in POI 3.17 - this method is not used within POI
      */
     public static int calculateSizeOfRecords(int nBlocks, int nRows) {
         // One DBCell per block.
index 91c1f13ec096a4399840a73aa2abb45ef9a0390c..fd7163a5289b08c0ebc479a220b048e7b29514ea 100644 (file)
@@ -114,14 +114,14 @@ public final class DVALRecord extends StandardRecord implements Cloneable {
        }
 
        /**
-     * get Object ID of the drop down arrow object for list boxes
+     * @return the Object ID of the drop down arrow object for list boxes
      */
     public int getObjectID() {
         return field_cbo_id;
     }
 
     /**
-     * Get number of following DV records
+     * @return the number of following DV records
      */
     public int getDVRecNo() {
         return field_5_dv_no;
index dc8c5f82ccb11109ebf3ed79dd13fcbcf9de4ae0..f0a676b18c73e328d981f48bc10af3c2becae5d2 100644 (file)
@@ -37,7 +37,7 @@ public final class EndSubRecord extends SubRecord implements Cloneable {
 
     /**
      * @param in unused (since this record has no data)
-     * @param size 
+     * @param size must be 0
      */
     public EndSubRecord(LittleEndianInput in, int size) {
         if ((size & 0xFF) != ENCODED_SIZE) { // mask out random crap in upper byte
index ccc3935b5eebb2977934e5c1d2a5a5b29bccd5d4..3d043681be1f2a6b4e15fe86d94e2fdf363c8f3b 100644 (file)
@@ -41,145 +41,145 @@ import org.apache.poi.util.LittleEndianOutput;
 public final class ExtendedFormatRecord
     extends StandardRecord
 {
-    public final static short     sid                 = 0xE0;
+    public static final short     sid                 = 0xE0;
 
     // null constant
-    public final static short     NULL                = (short)0xfff0;
+    public static final short     NULL                = (short)0xfff0;
 
     // xf type
-    public final static short     XF_STYLE            = 1;
-    public final static short     XF_CELL             = 0;
+    public static final short     XF_STYLE            = 1;
+    public static final short     XF_CELL             = 0;
 
     // borders
-    public final static short     NONE                = 0x0;
-    public final static short     THIN                = 0x1;
-    public final static short     MEDIUM              = 0x2;
-    public final static short     DASHED              = 0x3;
-    public final static short     DOTTED              = 0x4;
-    public final static short     THICK               = 0x5;
-    public final static short     DOUBLE              = 0x6;
-    public final static short     HAIR                = 0x7;
-    public final static short     MEDIUM_DASHED       = 0x8;
-    public final static short     DASH_DOT            = 0x9;
-    public final static short     MEDIUM_DASH_DOT     = 0xA;
-    public final static short     DASH_DOT_DOT        = 0xB;
-    public final static short     MEDIUM_DASH_DOT_DOT = 0xC;
-    public final static short     SLANTED_DASH_DOT    = 0xD;
+    public static final short     NONE                = 0x0;
+    public static final short     THIN                = 0x1;
+    public static final short     MEDIUM              = 0x2;
+    public static final short     DASHED              = 0x3;
+    public static final short     DOTTED              = 0x4;
+    public static final short     THICK               = 0x5;
+    public static final short     DOUBLE              = 0x6;
+    public static final short     HAIR                = 0x7;
+    public static final short     MEDIUM_DASHED       = 0x8;
+    public static final short     DASH_DOT            = 0x9;
+    public static final short     MEDIUM_DASH_DOT     = 0xA;
+    public static final short     DASH_DOT_DOT        = 0xB;
+    public static final short     MEDIUM_DASH_DOT_DOT = 0xC;
+    public static final short     SLANTED_DASH_DOT    = 0xD;
 
     // alignment
-    public final static short     GENERAL             = 0x0;
-    public final static short     LEFT                = 0x1;
-    public final static short     CENTER              = 0x2;
-    public final static short     RIGHT               = 0x3;
-    public final static short     FILL                = 0x4;
-    public final static short     JUSTIFY             = 0x5;
-    public final static short     CENTER_SELECTION    = 0x6;
+    public static final short     GENERAL             = 0x0;
+    public static final short     LEFT                = 0x1;
+    public static final short     CENTER              = 0x2;
+    public static final short     RIGHT               = 0x3;
+    public static final short     FILL                = 0x4;
+    public static final short     JUSTIFY             = 0x5;
+    public static final short     CENTER_SELECTION    = 0x6;
 
     // vertical alignment
-    public final static short     VERTICAL_TOP        = 0x0;
-    public final static short     VERTICAL_CENTER     = 0x1;
-    public final static short     VERTICAL_BOTTOM     = 0x2;
-    public final static short     VERTICAL_JUSTIFY    = 0x3;
+    public static final short     VERTICAL_TOP        = 0x0;
+    public static final short     VERTICAL_CENTER     = 0x1;
+    public static final short     VERTICAL_BOTTOM     = 0x2;
+    public static final short     VERTICAL_JUSTIFY    = 0x3;
 
     // fill
-    public final static short     NO_FILL             = 0  ;
-    public final static short     SOLID_FILL          = 1  ;
-    public final static short     FINE_DOTS           = 2  ;
-    public final static short     ALT_BARS            = 3  ;
-    public final static short     SPARSE_DOTS         = 4  ;
-    public final static short     THICK_HORZ_BANDS    = 5  ;
-    public final static short     THICK_VERT_BANDS    = 6  ;
-    public final static short     THICK_BACKWARD_DIAG = 7  ;
-    public final static short     THICK_FORWARD_DIAG  = 8  ;
-    public final static short     BIG_SPOTS           = 9  ;
-    public final static short     BRICKS              = 10 ;
-    public final static short     THIN_HORZ_BANDS     = 11 ;
-    public final static short     THIN_VERT_BANDS     = 12 ;
-    public final static short     THIN_BACKWARD_DIAG  = 13 ;
-    public final static short     THIN_FORWARD_DIAG   = 14 ;
-    public final static short     SQUARES             = 15 ;
-    public final static short     DIAMONDS            = 16 ;
+    public static final short     NO_FILL             = 0  ;
+    public static final short     SOLID_FILL          = 1  ;
+    public static final short     FINE_DOTS           = 2  ;
+    public static final short     ALT_BARS            = 3  ;
+    public static final short     SPARSE_DOTS         = 4  ;
+    public static final short     THICK_HORZ_BANDS    = 5  ;
+    public static final short     THICK_VERT_BANDS    = 6  ;
+    public static final short     THICK_BACKWARD_DIAG = 7  ;
+    public static final short     THICK_FORWARD_DIAG  = 8  ;
+    public static final short     BIG_SPOTS           = 9  ;
+    public static final short     BRICKS              = 10 ;
+    public static final short     THIN_HORZ_BANDS     = 11 ;
+    public static final short     THIN_VERT_BANDS     = 12 ;
+    public static final short     THIN_BACKWARD_DIAG  = 13 ;
+    public static final short     THIN_FORWARD_DIAG   = 14 ;
+    public static final short     SQUARES             = 15 ;
+    public static final short     DIAMONDS            = 16 ;
 
     // fields in BOTH style and Cell XF records
     private short                 field_1_font_index;             // not bit-mapped
     private short                 field_2_format_index;           // not bit-mapped
 
     // field_3_cell_options bit map
-    static final private BitField _locked       = BitFieldFactory.getInstance(0x0001);
-    static final private BitField _hidden       = BitFieldFactory.getInstance(0x0002);
-    static final private BitField _xf_type      = BitFieldFactory.getInstance(0x0004);
-    static final private BitField _123_prefix   = BitFieldFactory.getInstance(0x0008);
-    static final private BitField _parent_index = BitFieldFactory.getInstance(0xFFF0);
+    private static final BitField _locked       = BitFieldFactory.getInstance(0x0001);
+    private static final BitField _hidden       = BitFieldFactory.getInstance(0x0002);
+    private static final BitField _xf_type      = BitFieldFactory.getInstance(0x0004);
+    private static final BitField _123_prefix   = BitFieldFactory.getInstance(0x0008);
+    private static final BitField _parent_index = BitFieldFactory.getInstance(0xFFF0);
     private short                 field_3_cell_options;
 
     // field_4_alignment_options bit map
-    static final private BitField _alignment          = BitFieldFactory.getInstance(0x0007);
-    static final private BitField _wrap_text          = BitFieldFactory.getInstance(0x0008);
-    static final private BitField _vertical_alignment = BitFieldFactory.getInstance(0x0070);
-    static final private BitField _justify_last       = BitFieldFactory.getInstance(0x0080);
-    static final private BitField _rotation           = BitFieldFactory.getInstance(0xFF00);
+    private static final BitField _alignment          = BitFieldFactory.getInstance(0x0007);
+    private static final BitField _wrap_text          = BitFieldFactory.getInstance(0x0008);
+    private static final BitField _vertical_alignment = BitFieldFactory.getInstance(0x0070);
+    private static final BitField _justify_last       = BitFieldFactory.getInstance(0x0080);
+    private static final BitField _rotation           = BitFieldFactory.getInstance(0xFF00);
     private short                 field_4_alignment_options;
 
     // field_5_indention_options
-    static final private BitField _indent                         =
+    private static final BitField _indent                         =
         BitFieldFactory.getInstance(0x000F);
-    static final private BitField _shrink_to_fit                  =
+    private static final BitField _shrink_to_fit                  =
         BitFieldFactory.getInstance(0x0010);
-    static final private BitField _merge_cells                    =
+    private static final BitField _merge_cells                    =
         BitFieldFactory.getInstance(0x0020);
-    static final private BitField _reading_order                  =
+    private static final BitField _reading_order                  =
         BitFieldFactory.getInstance(0x00C0);
 
     // apparently bits 8 and 9 are unused
-    static final private BitField _indent_not_parent_format       =
+    private static final BitField _indent_not_parent_format       =
         BitFieldFactory.getInstance(0x0400);
-    static final private BitField _indent_not_parent_font         =
+    private static final BitField _indent_not_parent_font         =
         BitFieldFactory.getInstance(0x0800);
-    static final private BitField _indent_not_parent_alignment    =
+    private static final BitField _indent_not_parent_alignment    =
         BitFieldFactory.getInstance(0x1000);
-    static final private BitField _indent_not_parent_border       =
+    private static final BitField _indent_not_parent_border       =
         BitFieldFactory.getInstance(0x2000);
-    static final private BitField _indent_not_parent_pattern      =
+    private static final BitField _indent_not_parent_pattern      =
         BitFieldFactory.getInstance(0x4000);
-    static final private BitField _indent_not_parent_cell_options =
+    private static final BitField _indent_not_parent_cell_options =
         BitFieldFactory.getInstance(0x8000);
     private short                 field_5_indention_options;
 
     // field_6_border_options bit map
-    static final private BitField _border_left   = BitFieldFactory.getInstance(0x000F);
-    static final private BitField _border_right  = BitFieldFactory.getInstance(0x00F0);
-    static final private BitField _border_top    = BitFieldFactory.getInstance(0x0F00);
-    static final private BitField _border_bottom = BitFieldFactory.getInstance(0xF000);
+    private static final BitField _border_left   = BitFieldFactory.getInstance(0x000F);
+    private static final BitField _border_right  = BitFieldFactory.getInstance(0x00F0);
+    private static final BitField _border_top    = BitFieldFactory.getInstance(0x0F00);
+    private static final BitField _border_bottom = BitFieldFactory.getInstance(0xF000);
     private short                 field_6_border_options;
 
     // all three of the following attributes are palette options
     // field_7_palette_options bit map
-    static final private BitField _left_border_palette_idx  =
+    private static final BitField _left_border_palette_idx  =
         BitFieldFactory.getInstance(0x007F);
-    static final private BitField _right_border_palette_idx =
+    private static final BitField _right_border_palette_idx =
         BitFieldFactory.getInstance(0x3F80);
-    static final private BitField _diag                     =
+    private static final BitField _diag                     =
         BitFieldFactory.getInstance(0xC000);
     private short                 field_7_palette_options;
 
     // field_8_adtl_palette_options bit map
-    static final private BitField _top_border_palette_idx    =
+    private static final BitField _top_border_palette_idx    =
         BitFieldFactory.getInstance(0x0000007F);
-    static final private BitField _bottom_border_palette_idx =
+    private static final BitField _bottom_border_palette_idx =
         BitFieldFactory.getInstance(0x00003F80);
-    static final private BitField _adtl_diag                 =
+    private static final BitField _adtl_diag                 =
         BitFieldFactory.getInstance(0x001fc000);
-    static final private BitField _adtl_diag_line_style      =
+    private static final BitField _adtl_diag_line_style      =
         BitFieldFactory.getInstance(0x01e00000);
 
     // apparently bit 25 is unused
-    static final private BitField _adtl_fill_pattern         =
+    private static final BitField _adtl_fill_pattern         =
         BitFieldFactory.getInstance(0xfc000000);
     private int                   field_8_adtl_palette_options;   // additional to avoid 2
 
     // field_9_fill_palette_options bit map
-    static final private BitField _fill_foreground = BitFieldFactory.getInstance(0x007F);
-    static final private BitField _fill_background = BitFieldFactory.getInstance(0x3f80);
+    private static final BitField _fill_foreground = BitFieldFactory.getInstance(0x007F);
+    private static final BitField _fill_background = BitFieldFactory.getInstance(0x3f80);
 
     // apparently bits 15 and 14 are unused
     private short                 field_9_fill_palette_options;
@@ -398,8 +398,7 @@ public final class ExtendedFormatRecord
      * Dunno.  Docs just say this is for far east versions..  (I'm guessing it
      * justifies for right-to-left read languages)
      *
-     *
-     * @param justify
+     * @param justify use 0 for US
      * @see #setAlignmentOptions(short)
      */
 
@@ -907,14 +906,10 @@ public final class ExtendedFormatRecord
             _adtl_fill_pattern.setValue(field_8_adtl_palette_options, fill);
     }
 
-    // end bitfields for additional palette options
-
     /**
-     * set the fill palette options bitmask (see
-     *
-     *
-     * @param options
+     * set the fill palette options bitmask (see bitfields for additional palette options)
      *
+     * @param options the palette options
      */
 
     public void setFillPaletteOptions(short options)
@@ -1662,6 +1657,7 @@ public final class ExtendedFormatRecord
         return _fill_background.getShortValue(field_9_fill_palette_options);
     }
 
+    @Override
     public String toString()
     {
         StringBuffer buffer = new StringBuffer();
@@ -1769,6 +1765,7 @@ public final class ExtendedFormatRecord
         return buffer.toString();
     }
 
+    @Override
     public void serialize(LittleEndianOutput out) {
         out.writeShort(getFontIndex());
         out.writeShort(getFormatIndex());
@@ -1781,10 +1778,12 @@ public final class ExtendedFormatRecord
         out.writeShort(getFillPaletteOptions());
     }
 
+    @Override
     protected int getDataSize() {
         return 20;
     }
 
+    @Override
     public short getSid()
     {
         return sid;
@@ -1797,7 +1796,9 @@ public final class ExtendedFormatRecord
      *  
      * If The source ExtendedFormatRecord comes from
      *  a different Workbook, you will need to sort
-     *  out the font and format indicies yourself!
+     *  out the font and format indices yourself!
+     * 
+     * @param source the ExtendedFormatRecord to copy from
      */
     public void cloneStyleFrom(ExtendedFormatRecord source) {
         field_1_font_index           = source.field_1_font_index;
@@ -1811,7 +1812,8 @@ public final class ExtendedFormatRecord
         field_9_fill_palette_options = source.field_9_fill_palette_options;
     }
 
-       public int hashCode() {
+       @Override
+    public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + field_1_font_index;
@@ -1831,7 +1833,8 @@ public final class ExtendedFormatRecord
         *  contents as equals, as the various indexes
         *  that matter are embedded in the records
         */
-       public boolean equals(Object obj) {
+       @Override
+    public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
index beee8bca6d3c9f8af11f5429cc5a071c4ef703d9..37d8c4daa58a3d6397d829db84a289c8848ef5d8 100644 (file)
@@ -186,7 +186,9 @@ public class ExternSheetRecord extends StandardRecord {
        }
 
     /**
-     * Returns the index of the SupBookRecord for this index
+     * @param refIndex specifies the n-th refIndex
+     * 
+     * @return the index of the SupBookRecord for this index
      */
     public int getExtbookIndexFromRefIndex(int refIndex) {
         RefSubRecord refRec = getRef(refIndex);
index 33a4166cc89a8dfc34eb37b78ae2eaf23c0d6dd0..b6721352eff4df65e3c65bc438c246aec2219377 100644 (file)
@@ -61,25 +61,31 @@ public final class ExternalNameRecord extends StandardRecord {
        private int _nRows;
 
        /**
-        * Convenience Function to determine if the name is a built-in name
+        * @return {@code true} if the name is a built-in name
         */
        public boolean isBuiltInName() {
                return (field_1_option_flag & OPT_BUILTIN_NAME) != 0;
        }
        /**
         * For OLE and DDE, links can be either 'automatic' or 'manual'
+        * 
+        * @return {@code true} if this is a automatic link
         */
        public boolean isAutomaticLink() {
                return (field_1_option_flag & OPT_AUTOMATIC_LINK) != 0;
        }
        /**
         * only for OLE and DDE
+        * 
+        * @return {@code true} if this is a picture link
         */
        public boolean isPicureLink() {
                return (field_1_option_flag & OPT_PICTURE_LINK) != 0;
        }
        /**
         * DDE links only. If <code>true</code>, this denotes the 'StdDocumentName'
+        * 
+        * @return {@code true} if this denotes the 'StdDocumentName'
         */
        public boolean isStdDocumentNameIdentifier() {
                return (field_1_option_flag & OPT_STD_DOCUMENT_NAME) != 0;
@@ -104,12 +110,15 @@ public final class ExternalNameRecord extends StandardRecord {
        /**
         * If this is a local name, then this is the (1 based)
         *  index of the name of the Sheet this refers to, as
-        *  defined in the preceeding {@link SupBookRecord}.
+        *  defined in the preceding {@link SupBookRecord}.
         * If it isn't a local name, then it must be zero.
+        * 
+        * @return the index of the name of the Sheet this refers to
         */
        public short getIx() {
           return field_2_ixals;
        }
+       
     public void setIx(short ix) {
         field_2_ixals = ix;
     }
@@ -212,8 +221,7 @@ public final class ExternalNameRecord extends StandardRecord {
                sb.append("    .name    = ").append(field_4_name).append("\n");
                if(field_5_name_definition != null) {
             Ptg[] ptgs = field_5_name_definition.getTokens();
-            for (int i = 0; i < ptgs.length; i++) {
-                Ptg ptg = ptgs[i];
+            for (Ptg ptg : ptgs) {
                 sb.append(ptg.toString()).append(ptg.getRVAType()).append("\n");
             }
                }