/** * Get actions appropriate to a certain file selection. * By default, returns the same list as {@link #getActions()}. * @param foSet one or more files which may be selected * @return zero or more actions appropriate to those files */ public SystemAction[] getActions(Set<FileObject> foSet) { return this.getActions(); }
public @Override SystemAction[] getActions(final Set<FileObject> foSet) { List<SystemAction> al = new ArrayList<SystemAction>(101); // randomly choosen constant Set<SystemAction> uniq = new HashSet<SystemAction>(101); // not that randommly choosen final FileSystem[] del = this.getDelegates(); for (int i = 0; i < del.length; i++) { if (del[i] == null) { continue; } final SystemAction[] acts = del[i].getActions(foSet); for (int j = 0; j < acts.length; j++) { if (uniq.add(acts[j])) { al.add(acts[j]); } } } return al.toArray(new SystemAction[al.size()]); }
/** Merge actions from all delegates. */ public @Override SystemAction[] getActions() { List<SystemAction> al = new ArrayList<SystemAction>(101); // randomly choosen constant Set<SystemAction> uniq = new HashSet<SystemAction>(101); // not that randommly choosen FileSystem[] del = this.getDelegates(); for (int i = 0; i < del.length; i++) { if (del[i] == null) { continue; } SystemAction[] acts = del[i].getActions(); for (int j = 0; j < acts.length; j++) { if (uniq.add(acts[j])) { al.add(acts[j]); } } } return al.toArray(new SystemAction[al.size()]); }
@Override public SystemAction[] getActions() { return this.explicit!=null?this.explicit.getActions():null; } }
public SystemAction[] getActions (java.util.Set foSet) { return this.getActions(); }
public SystemAction[] getActions (java.util.Set foSet) { return this.getActions(); }
/** Merge actions from all delegates. */ public SystemAction[] getActions () { ArrayList al = new ArrayList(101); // randomly choosen constant HashSet uniq = new HashSet(101); // not that randommly choosen FileSystem[] del = this.getDelegates(); for (int i=0; i<del.length; i++) { if (del[i] == null) continue; SystemAction[] acts = del[i].getActions(); for (int j=0; j<acts.length; j++) { if (uniq.add(acts[j])) al.add(acts[j]); } } return (SystemAction[])al.toArray(new SystemAction[al.size ()]); }
/** Merge actions from all delegates. */ public SystemAction[] getActions () { ArrayList al = new ArrayList(101); // randomly choosen constant HashSet uniq = new HashSet(101); // not that randommly choosen FileSystem[] del = this.getDelegates(); for (int i=0; i<del.length; i++) { if (del[i] == null) continue; SystemAction[] acts = del[i].getActions(); for (int j=0; j<acts.length; j++) { if (uniq.add(acts[j])) al.add(acts[j]); } } return (SystemAction[])al.toArray(new SystemAction[al.size ()]); }
public SystemAction[] getActions (final Set foSet) { final ArrayList al = new ArrayList(101); // randomly choosen constant final HashSet uniq = new HashSet(101); // not that randommly choosen final FileSystem[] del = this.getDelegates(); for (int i=0; i<del.length; i++) { if (del[i] == null) continue; final SystemAction[] acts = del[i].getActions(foSet); for (int j=0; j<acts.length; j++) { if (uniq.add(acts[j])) al.add(acts[j]); } } return (SystemAction[])al.toArray(new SystemAction[al.size ()]); }
public SystemAction[] getActions (final Set foSet) { final ArrayList al = new ArrayList(101); // randomly choosen constant final HashSet uniq = new HashSet(101); // not that randommly choosen final FileSystem[] del = this.getDelegates(); for (int i=0; i<del.length; i++) { if (del[i] == null) continue; final SystemAction[] acts = del[i].getActions(foSet); for (int j=0; j<acts.length; j++) { if (uniq.add(acts[j])) al.add(acts[j]); } } return (SystemAction[])al.toArray(new SystemAction[al.size ()]); }
result.addAll (java.util.Arrays.asList (fs.getActions (backSet)));