1 19 20 package com.sslexplorer.vfs; 21 22 25 public final class VFSFileLock implements Comparable <VFSFileLock> { 26 27 private final String fileName; 28 private final String fileURI; 29 private final boolean active; 30 private final String handle; 31 32 39 public VFSFileLock(String fileName, String fileURI, boolean active, String handle) { 40 this.fileName = fileName; 41 this.fileURI = fileURI; 42 this.active = active; 43 this.handle = handle; 44 } 45 46 49 public String getFileName() { 50 return fileName; 51 } 52 53 56 public String getFileURI() { 57 return fileURI; 58 } 59 60 63 public boolean isActive() { 64 return active; 65 } 66 67 70 public String getHandle() { 71 return handle; 72 } 73 74 77 public int compareTo(VFSFileLock o) { 78 return getFileName().compareTo(o.getFileName()); 79 } 80 81 @Override 82 public String toString() { 83 StringBuffer buffer = new StringBuffer (); 84 buffer.append("['"); 85 buffer.append("fileName=").append(getFileName()).append("', "); 86 buffer.append("fileURI=").append(getFileURI()).append("', "); 87 buffer.append("active='").append(isActive()).append("', "); 88 buffer.append("handle='").append(getHandle()).append("'"); 89 buffer.append("]"); 90 return buffer.toString(); 91 } 92 } | Popular Tags |