mirror of https://github.com/apache/poi.git
format and sort members
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1147384 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
456d1aee06
commit
de1e4e61d5
|
@ -17,13 +17,12 @@
|
||||||
|
|
||||||
package org.apache.poi.hwpf.usermodel;
|
package org.apache.poi.hwpf.usermodel;
|
||||||
|
|
||||||
|
import java.lang.reflect.AccessibleObject;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import org.apache.poi.hwpf.model.types.SEPAbstractType;
|
import org.apache.poi.hwpf.model.types.SEPAbstractType;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
public final class SectionProperties extends SEPAbstractType
|
||||||
import java.lang.reflect.AccessibleObject;
|
|
||||||
|
|
||||||
public final class SectionProperties
|
|
||||||
extends SEPAbstractType
|
|
||||||
{
|
{
|
||||||
public SectionProperties()
|
public SectionProperties()
|
||||||
{
|
{
|
||||||
|
@ -34,41 +33,42 @@ public final class SectionProperties
|
||||||
field_26_dttmPropRMark = new DateAndTime();
|
field_26_dttmPropRMark = new DateAndTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone() throws CloneNotSupportedException
|
||||||
throws CloneNotSupportedException
|
|
||||||
{
|
{
|
||||||
SectionProperties copy = (SectionProperties)super.clone();
|
SectionProperties copy = (SectionProperties) super.clone();
|
||||||
copy.field_20_brcTop = (BorderCode)field_20_brcTop.clone();
|
copy.field_20_brcTop = (BorderCode) field_20_brcTop.clone();
|
||||||
copy.field_21_brcLeft = (BorderCode)field_21_brcLeft.clone();
|
copy.field_21_brcLeft = (BorderCode) field_21_brcLeft.clone();
|
||||||
copy.field_22_brcBottom = (BorderCode)field_22_brcBottom.clone();
|
copy.field_22_brcBottom = (BorderCode) field_22_brcBottom.clone();
|
||||||
copy.field_23_brcRight = (BorderCode)field_23_brcRight.clone();
|
copy.field_23_brcRight = (BorderCode) field_23_brcRight.clone();
|
||||||
copy.field_26_dttmPropRMark = (DateAndTime)field_26_dttmPropRMark.clone();
|
copy.field_26_dttmPropRMark = (DateAndTime) field_26_dttmPropRMark
|
||||||
|
.clone();
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals(Object obj)
|
public boolean equals( Object obj )
|
||||||
{
|
{
|
||||||
Field[] fields = SectionProperties.class.getSuperclass().getDeclaredFields();
|
Field[] fields = SectionProperties.class.getSuperclass()
|
||||||
AccessibleObject.setAccessible(fields, true);
|
.getDeclaredFields();
|
||||||
|
AccessibleObject.setAccessible( fields, true );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
for (int x = 0; x < fields.length; x++)
|
for ( int x = 0; x < fields.length; x++ )
|
||||||
{
|
{
|
||||||
Object obj1 = fields[x].get(this);
|
Object obj1 = fields[x].get( this );
|
||||||
Object obj2 = fields[x].get(obj);
|
Object obj2 = fields[x].get( obj );
|
||||||
if (obj1 == null && obj2 == null)
|
if ( obj1 == null && obj2 == null )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!obj1.equals(obj2))
|
if ( !obj1.equals( obj2 ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch ( Exception e )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue