@SuppressWarnings("RedundantIfStatement") @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Key)) { return false; } Key key = (Key) o; if (!mBuildToolsRevision.equals(key.mBuildToolsRevision)) { return false; } if (!mSourceFile.equals(key.mSourceFile)) { return false; } return true; }
@NonNull private Optional<LoadedBuildTool> findVersion(Revision version) { for (LoadedBuildTool loadedBuildTool : loadedBuildTools) { if (loadedBuildTool.version.equals(version)) { return Optional.of(loadedBuildTool); } } return Optional.empty(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof RemoteToolPkgInfo)) { return false; } RemoteToolPkgInfo other = (RemoteToolPkgInfo) obj; if (mMinPlatformToolsRevision == null) { if (other.mMinPlatformToolsRevision != null) { return false; } } else if (!mMinPlatformToolsRevision.equals(other.mMinPlatformToolsRevision)) { return false; } return true; } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof IMinToolsDependency)) { return false; } IMinToolsDependency other = (IMinToolsDependency) obj; if (mMinToolsRevision == null) { if (other.getMinToolsRevision() != null) { return false; } } else if (!mMinToolsRevision.equals(other.getMinToolsRevision())) { return false; } return true; } }
public void saveProperties(Properties props) { if (!getMinToolsRevision().equals(MIN_TOOLS_REV_NOT_SPECIFIED)) { props.setProperty(PkgProps.MIN_TOOLS_REV, getMinToolsRevision().toShortString()); } }
@Override public boolean equals(Object obj) { return obj instanceof RepoPackage && ((RepoPackage) obj).getPath().equals(getPath()) && ((RepoPackage) obj).getVersion().equals(getVersion()); }
@Nullable public PatchType getPatch(Revision fromRevision) { for (PatchType p : getAllPatches()) { if (p.getBasedOn().toRevision().equals(fromRevision)) { return p; } } return null; }
/** * Retrieves information on a package identified by its {@link Revision}. * <p> * Note that {@link PkgType#PKG_TOOLS} and {@link PkgType#PKG_PLATFORM_TOOLS} * are unique in a local SDK so you'll want to use {@link #getPkgInfo(PkgType)} * to retrieve them instead. * * @param filter {@link PkgType#PKG_BUILD_TOOLS}. * @param revision The {@link Revision} uniquely identifying this package. * @return An existing package information or null if not found. */ @Nullable public LocalPkgInfo getPkgInfo(@NonNull PkgType filter, @NonNull Revision revision) { assert filter == PkgType.PKG_BUILD_TOOLS; for (LocalPkgInfo pkg : getPkgsInfos(filter)) { IPkgDesc d = pkg.getDesc(); if (d.getRevision().equals(revision)) { return pkg; } } return null; }
if (!buildToolsPackage.getVersion().equals(buildToolRevision)) { progress.logWarning( "Build Tools revision " +
if (buildToolInfo != null && !buildToolInfo.getRevision().equals(buildToolRevision)) { stdOutputProgress.logWarning("Build Tools revision " + buildToolRevision +
SdkRepoConstants.NODE_MIN_PLATFORM_TOOLS_REV)); if (mMinPlatformToolsRevision.equals(MIN_PLATFORM_TOOLS_REV_INVALID)) {