public IInstallableUnit getIU(String id, Version version, String type) { if (type == null || type == ROOT) { IInstallableUnit result = rootIUs.get(id, version); if (result != null) return result; } if (type == null || type == NON_ROOT) { IInstallableUnit result = nonRootIUs.get(id, version); if (result != null) return result; } return null; }
public IInstallableUnit getIU(String id, Version version, String type) { if (type == null || type == ROOT) { IInstallableUnit result = rootIUs.get(id, version); if (result != null) return result; } if (type == null || type == NON_ROOT) { IInstallableUnit result = nonRootIUs.get(id, version); if (result != null) return result; } return null; }
public IInstallableUnit getIU(String id, Version version, String type) { if (type == null || type == ROOT) { IInstallableUnit result = rootIUs.get(id, version); if (result != null) return result; } if (type == null || type == NON_ROOT) { IInstallableUnit result = nonRootIUs.get(id, version); if (result != null) return result; } return null; }
@Override public IInstallableUnit getIU(String id, Version version, String type) { if (type == null || type == ROOT) { IInstallableUnit result = rootIUs.get(id, version); if (result != null) return result; } if (type == null || type == NON_ROOT) { IInstallableUnit result = nonRootIUs.get(id, version); if (result != null) return result; } return null; }
/** * Returns the IUs in this result with the given id. */ public Collection<IInstallableUnit> getIUs(String id, String type) { if (type == null) { // TODO can this be optimized? ArrayList<IInstallableUnit> result = new ArrayList<IInstallableUnit>(); result.addAll(rootIUs.get(id).toUnmodifiableSet()); result.addAll(nonRootIUs.get(id).toUnmodifiableSet()); return result; } if (type == ROOT) return rootIUs.get(id).toUnmodifiableSet(); if (type == NON_ROOT) return nonRootIUs.get(id).toUnmodifiableSet(); return null; }
/** * Returns the IUs in this result with the given id. */ @Override public Collection<IInstallableUnit> getIUs(String id, String type) { if (type == null) { // TODO can this be optimized? ArrayList<IInstallableUnit> result = new ArrayList<>(); result.addAll(rootIUs.get(id).toUnmodifiableSet()); result.addAll(nonRootIUs.get(id).toUnmodifiableSet()); return result; } if (type == ROOT) return rootIUs.get(id).toUnmodifiableSet(); if (type == NON_ROOT) return nonRootIUs.get(id).toUnmodifiableSet(); return null; }
/** * Returns the IUs in this result with the given id. */ public Collection<IInstallableUnit> getIUs(String id, String type) { if (type == null) { // TODO can this be optimized? ArrayList<IInstallableUnit> result = new ArrayList<IInstallableUnit>(); result.addAll(rootIUs.get(id).toUnmodifiableSet()); result.addAll(nonRootIUs.get(id).toUnmodifiableSet()); return result; } if (type == ROOT) return rootIUs.get(id).toUnmodifiableSet(); if (type == NON_ROOT) return nonRootIUs.get(id).toUnmodifiableSet(); return null; }
/** * Returns the IUs in this result with the given id. */ public Collection<IInstallableUnit> getIUs(String id, String type) { if (type == null) { // TODO can this be optimized? ArrayList<IInstallableUnit> result = new ArrayList<IInstallableUnit>(); result.addAll(rootIUs.get(id).toUnmodifiableSet()); result.addAll(nonRootIUs.get(id).toUnmodifiableSet()); return result; } if (type == ROOT) return rootIUs.get(id).toUnmodifiableSet(); if (type == NON_ROOT) return nonRootIUs.get(id).toUnmodifiableSet(); return null; }
public IInstallableUnit getIU(String id, String type) { if (type == null || type == ROOT) { IQueryResult<IInstallableUnit> ius = rootIUs.get(id); if (!ius.isEmpty()) return ius.iterator().next(); } if (type == null || type == NON_ROOT) { IQueryResult<IInstallableUnit> ius = nonRootIUs.get(id); if (!ius.isEmpty()) return ius.iterator().next(); } return null; }
public IInstallableUnit getIU(String id, String type) { if (type == null || type == ROOT) { IQueryResult<IInstallableUnit> ius = rootIUs.get(id); if (!ius.isEmpty()) return ius.iterator().next(); } if (type == null || type == NON_ROOT) { IQueryResult<IInstallableUnit> ius = nonRootIUs.get(id); if (!ius.isEmpty()) return ius.iterator().next(); } return null; }
public IInstallableUnit getIU(String id, String type) { if (type == null || type == ROOT) { IQueryResult<IInstallableUnit> ius = rootIUs.get(id); if (!ius.isEmpty()) return ius.iterator().next(); } if (type == null || type == NON_ROOT) { IQueryResult<IInstallableUnit> ius = nonRootIUs.get(id); if (!ius.isEmpty()) return ius.iterator().next(); } return null; }
@Deprecated @Override public IInstallableUnit getIU(String id, String type) { if (type == null || type == ROOT) { IQueryResult<IInstallableUnit> ius = rootIUs.get(id); if (!ius.isEmpty()) return ius.iterator().next(); } if (type == null || type == NON_ROOT) { IQueryResult<IInstallableUnit> ius = nonRootIUs.get(id); if (!ius.isEmpty()) return ius.iterator().next(); } return null; }