1 16 package org.apache.commons.vfs; 17 18 23 public final class FileType 24 { 25 29 public static final FileType FOLDER = new FileType("folder", true, false, true); 30 31 35 public static final FileType FILE = new FileType("file", false, true, true); 36 37 41 public static final FileType IMAGINARY = new FileType("imaginary", false, false, false); 42 43 private final String name; 44 private final boolean hasChildren; 45 private final boolean hasContent; 46 private final boolean hasAttrs; 47 48 private FileType(final String name, 49 final boolean hasChildren, 50 final boolean hasContent, 51 final boolean hasAttrs) 52 { 53 this.name = name; 54 this.hasChildren = hasChildren; 55 this.hasContent = hasContent; 56 this.hasAttrs = hasAttrs; 57 } 58 59 62 public String toString() 63 { 64 return name; 65 } 66 67 70 public String getName() 71 { 72 return name; 73 } 74 75 78 public boolean hasChildren() 79 { 80 return hasChildren; 81 } 82 83 86 public boolean hasContent() 87 { 88 return hasContent; 89 } 90 91 94 public boolean hasAttributes() 95 { 96 return hasAttrs; 97 } 98 } 99 | Popular Tags |