Subversion Repository Public Repository

litesoft

Diff Revisions 958 vs 959 for /trunk/Java/ScarPlus/src/com/esotericsoftware/filesystem/RootedPaths.java

Diff revisions: vs.
  @@ -5,60 +5,49 @@
5 5 import java.io.*;
6 6 import java.util.*;
7 7
8 - public final class RootedPaths
9 - {
8 + public final class RootedPaths {
10 9 private long mGreatestLastModified;
11 10 private File mCanonicalRootDirectory;
12 11 private Set<String> mCanonicalRelativePaths = new HashSet<String>();
13 12
14 - public RootedPaths( File pCanonicalRootDirectory )
15 - {
13 + public RootedPaths( File pCanonicalRootDirectory ) {
16 14 Utils.assertNotNull( "CanonicalRootDirectory", mCanonicalRootDirectory = pCanonicalRootDirectory );
17 15 }
18 16
19 - public void addCanonicalRelativePath( String pPath )
20 - {
17 + public void addCanonicalRelativePath( String pPath ) {
21 18 mGreatestLastModified = Math.max( mGreatestLastModified, new File( mCanonicalRootDirectory, pPath = Utils.assertNotEmpty( "Path", pPath ) ).lastModified() );
22 19 mCanonicalRelativePaths.add( pPath );
23 20 }
24 21
25 - public long getGreatestLastModified()
26 - {
22 + public long getGreatestLastModified() {
27 23 return mGreatestLastModified;
28 24 }
29 25
30 - public File getCanonicalRootDirectory()
31 - {
26 + public File getCanonicalRootDirectory() {
32 27 return mCanonicalRootDirectory;
33 28 }
34 29
35 - public int count()
36 - {
30 + public int count() {
37 31 return mCanonicalRelativePaths.size();
38 32 }
39 33
40 - public void collectPaths( List<FilePath> pPaths )
41 - {
42 - for ( String zPath : mCanonicalRelativePaths )
43 - {
34 + public void collectPaths( List<FilePath> pPaths ) {
35 + for ( String zPath : mCanonicalRelativePaths ) {
44 36 pPaths.add( FilePath.canonical( mCanonicalRootDirectory, zPath ) );
45 37 }
46 38 }
47 39
48 40 @Override
49 - public int hashCode()
50 - {
41 + public int hashCode() {
51 42 return mCanonicalRootDirectory.hashCode();
52 43 }
53 44
54 - public boolean equals( RootedPaths them )
55 - {
45 + public boolean equals( RootedPaths them ) {
56 46 return (them != null) && this.mCanonicalRootDirectory.equals( them.mCanonicalRootDirectory );
57 47 }
58 48
59 49 @Override
60 - public boolean equals( Object o )
61 - {
50 + public boolean equals( Object o ) {
62 51 return (o instanceof RootedPaths) && equals( (RootedPaths) o );
63 52 }
64 53