public int getEntryCount() { int size = directory.getEntryCount(); for (String excl : excludes) { if (directory.hasEntry(excl)) { size--; } } return size; }
@Override public boolean equals(Object other) { if (!(other instanceof DirectoryDelegate)) { return false; } DirectoryDelegate dd = (DirectoryDelegate)other; if (this == dd) { return true; } // First, check names if (!Objects.equals(dir.getName(),dd.dir.getName())) { return false; } // Next up, check they have the same number of children if (dir.getEntryCount() != dd.dir.getEntryCount()) { return false; } return entries().equals(dd.entries()); } }
@Override public int getChildCount(Object parent) { int result; if (parent instanceof DirectoryEntry) { DirectoryEntry node = (DirectoryEntry) parent; result = node.getEntryCount(); } else { result = 0; } return result; }
@Override public int getChildCount(Object parent) { int result; if (parent instanceof DirectoryEntry) { DirectoryEntry node = (DirectoryEntry) parent; result = node.getEntryCount(); } else { result = 0; } return result; }
public int getEntryCount() { int size = directory.getEntryCount(); for (String excl : excludes) { if (directory.hasEntry(excl)) { size--; } } return size; }
public int getEntryCount() { int size = directory.getEntryCount(); for (String excl : excludes) { if (directory.hasEntry(excl)) { size--; } } return size; }
public int getEntryCount() { int size = directory.getEntryCount(); for (String excl : excludes) { if (directory.hasEntry(excl)) { size--; } } return size; }
@Override public boolean equals(Object other) { if (!(other instanceof DirectoryDelegate)) { return false; } DirectoryDelegate dd = (DirectoryDelegate)other; if (this == dd) { return true; } // First, check names if (!Objects.equals(dir.getName(),dd.dir.getName())) { return false; } // Next up, check they have the same number of children if (dir.getEntryCount() != dd.dir.getEntryCount()) { return false; } return entries().equals(dd.entries()); } }
if (dirA.getEntryCount() != dirB.getEntryCount()) { return false;
if (dirA.getEntryCount() != dirB.getEntryCount()) { return false;