litesoft
@ 804
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
package org.litesoft.core.simpletypes; import org.litesoft.core.simpletypes.nonpublic.*; import org.litesoft.core.typeutils.*; import org.litesoft.core.util.*; public class TextFile extends EqualSupport implements SimpleType { private String mFileName; private TextLines mLines; /** * @deprecated - for Serialization */ protected TextFile() { } public TextFile( String pFileName, String... pLines ) { mFileName = UtilsCommon.assertNotNullNotEmpty( "FileName", pFileName ); mLines = new TextLines( Objects.assertNotNull( "Lines", pLines ) ); } public String getFileName() { return mFileName; } public String[] getLines() { return mLines.toStringArray(); } public boolean equals( Object o ) { return (this == o) || // ((o instanceof TextFile) && equals( (TextFile) o )); } public boolean equals( TextFile them ) { return (this == them) || // ((them != null) // && equal( this.mFileName, them.mFileName ) // && equal( this.mLines, them.mLines ) // ); } public int hashCode() { return mFileName.hashCode(); } public String toString() { return mFileName + ": " + mLines; } } |