]> source.dussan.org Git - poi.git/commitdiff
format and sort members
authorSergey Vladimirov <sergey@apache.org>
Sat, 16 Jul 2011 09:10:38 +0000 (09:10 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sat, 16 Jul 2011 09:10:38 +0000 (09:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1147384 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/usermodel/SectionProperties.java

index 4f89fe3216e292ce7f255df9c34925539b3a0b3b..776015cc7fa0ec621cf66e6b3cba37307e6d0356 100644 (file)
 
 package org.apache.poi.hwpf.usermodel;
 
-import org.apache.poi.hwpf.model.types.SEPAbstractType;
-
-import java.lang.reflect.Field;
 import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Field;
+
+import org.apache.poi.hwpf.model.types.SEPAbstractType;
 
-public final class SectionProperties
-  extends SEPAbstractType
+public final class SectionProperties extends SEPAbstractType
 {
-  public SectionProperties()
-  {
-    field_20_brcTop = new BorderCode();
-    field_21_brcLeft = new BorderCode();
-    field_22_brcBottom = new BorderCode();
-    field_23_brcRight = new BorderCode();
-    field_26_dttmPropRMark = new DateAndTime();
-  }
+    public SectionProperties()
+    {
+        field_20_brcTop = new BorderCode();
+        field_21_brcLeft = new BorderCode();
+        field_22_brcBottom = new BorderCode();
+        field_23_brcRight = new BorderCode();
+        field_26_dttmPropRMark = new DateAndTime();
+    }
 
-  public Object clone()
-    throws CloneNotSupportedException
-  {
-    SectionProperties copy = (SectionProperties)super.clone();
-    copy.field_20_brcTop = (BorderCode)field_20_brcTop.clone();
-    copy.field_21_brcLeft = (BorderCode)field_21_brcLeft.clone();
-    copy.field_22_brcBottom = (BorderCode)field_22_brcBottom.clone();
-    copy.field_23_brcRight = (BorderCode)field_23_brcRight.clone();
-    copy.field_26_dttmPropRMark = (DateAndTime)field_26_dttmPropRMark.clone();
+    public Object clone() throws CloneNotSupportedException
+    {
+        SectionProperties copy = (SectionProperties) super.clone();
+        copy.field_20_brcTop = (BorderCode) field_20_brcTop.clone();
+        copy.field_21_brcLeft = (BorderCode) field_21_brcLeft.clone();
+        copy.field_22_brcBottom = (BorderCode) field_22_brcBottom.clone();
+        copy.field_23_brcRight = (BorderCode) field_23_brcRight.clone();
+        copy.field_26_dttmPropRMark = (DateAndTime) field_26_dttmPropRMark
+                .clone();
 
-    return copy;
-  }
+        return copy;
+    }
 
-  public boolean equals(Object obj)
-  {
-    Field[] fields = SectionProperties.class.getSuperclass().getDeclaredFields();
-    AccessibleObject.setAccessible(fields, true);
-    try
+    public boolean equals( Object obj )
     {
-      for (int x = 0; x < fields.length; x++)
-      {
-        Object obj1 = fields[x].get(this);
-        Object obj2 = fields[x].get(obj);
-        if (obj1 == null && obj2 == null)
+        Field[] fields = SectionProperties.class.getSuperclass()
+                .getDeclaredFields();
+        AccessibleObject.setAccessible( fields, true );
+        try
         {
-          continue;
+            for ( int x = 0; x < fields.length; x++ )
+            {
+                Object obj1 = fields[x].get( this );
+                Object obj2 = fields[x].get( obj );
+                if ( obj1 == null && obj2 == null )
+                {
+                    continue;
+                }
+                if ( !obj1.equals( obj2 ) )
+                {
+                    return false;
+                }
+            }
+            return true;
         }
-        if (!obj1.equals(obj2))
+        catch ( Exception e )
         {
-          return false;
+            return false;
         }
-      }
-      return true;
-    }
-    catch (Exception e)
-    {
-      return false;
     }
-  }
 
 }