Java 类com.facebook.common.internal.Objects 实例源码

项目:GitHub    文件:HashCodeUtilTest.java   
private void testCase(Object o1, Object o2, Object o3, Object o4, Object o5, Object o6) {
  assertEquals(
      Objects.hashCode(o1),
      HashCodeUtil.hashCode(o1));
  assertEquals(
      Objects.hashCode(o1, o2),
      HashCodeUtil.hashCode(o1, o2));
  assertEquals(
      Objects.hashCode(o1, o2, o3),
      HashCodeUtil.hashCode(o1, o2, o3));
  assertEquals(
      Objects.hashCode(o1, o2, o3, o4),
      HashCodeUtil.hashCode(o1, o2, o3, o4));
  assertEquals(
      Objects.hashCode(o1, o2, o3, o4, o5),
      HashCodeUtil.hashCode(o1, o2, o3, o4, o5));
  assertEquals(
      Objects.hashCode(o1, o2, o3, o4, o5, o6),
      HashCodeUtil.hashCode(o1, o2, o3, o4, o5, o6));
}
项目:GitHub    文件:ImagePipeline.java   
/**
 * Returns a DataSource supplier that will on get submit the request for execution and return a
 * DataSource representing the pending results of the task.
 *
 * @param imageRequest the request to submit (what to execute).
 * @param callerContext the caller context of the caller of data source supplier
 * @param requestLevel which level to look down until for the image
 * @return a DataSource representing pending results and completion of the request
 */
public Supplier<DataSource<CloseableReference<CloseableImage>>> getDataSourceSupplier(
    final ImageRequest imageRequest,
    final Object callerContext,
    final ImageRequest.RequestLevel requestLevel) {
  return new Supplier<DataSource<CloseableReference<CloseableImage>>>() {
    @Override
    public DataSource<CloseableReference<CloseableImage>> get() {
      return fetchDecodedImage(imageRequest, callerContext, requestLevel);
    }

    @Override
    public String toString() {
      return Objects.toStringHelper(this)
          .add("uri", imageRequest.getSourceUri())
          .toString();
    }
  };
}
项目:GitHub    文件:ImagePipeline.java   
/**
 * Returns a DataSource supplier that will on get submit the request for execution and return a
 * DataSource representing the pending results of the task.
 *
 * @param imageRequest the request to submit (what to execute).
 * @return a DataSource representing pending results and completion of the request
 */
public Supplier<DataSource<CloseableReference<PooledByteBuffer>>>
getEncodedImageDataSourceSupplier(
    final ImageRequest imageRequest,
    final Object callerContext) {
  return new Supplier<DataSource<CloseableReference<PooledByteBuffer>>>() {
    @Override
    public DataSource<CloseableReference<PooledByteBuffer>> get() {
      return fetchEncodedImage(imageRequest, callerContext);
    }

    @Override
    public String toString() {
      return Objects.toStringHelper(this)
          .add("uri", imageRequest.getSourceUri())
          .toString();
    }
  };
}
项目:GitHub    文件:AbstractDraweeControllerBuilder.java   
/** Creates a data source supplier for the given image request. */
protected Supplier<DataSource<IMAGE>> getDataSourceSupplierForRequest(
    final REQUEST imageRequest,
    final CacheLevel cacheLevel) {
  final Object callerContext = getCallerContext();
  return new Supplier<DataSource<IMAGE>>() {
    @Override
    public DataSource<IMAGE> get() {
      return getDataSourceForRequest(imageRequest, callerContext, cacheLevel);
    }
    @Override
    public String toString() {
      return Objects.toStringHelper(this)
          .add("request", imageRequest.toString())
          .toString();
    }
  };
}
项目:fresco    文件:HashCodeUtilTest.java   
private void testCase(Object o1, Object o2, Object o3, Object o4, Object o5, Object o6) {
  assertEquals(
      Objects.hashCode(o1),
      HashCodeUtil.hashCode(o1));
  assertEquals(
      Objects.hashCode(o1, o2),
      HashCodeUtil.hashCode(o1, o2));
  assertEquals(
      Objects.hashCode(o1, o2, o3),
      HashCodeUtil.hashCode(o1, o2, o3));
  assertEquals(
      Objects.hashCode(o1, o2, o3, o4),
      HashCodeUtil.hashCode(o1, o2, o3, o4));
  assertEquals(
      Objects.hashCode(o1, o2, o3, o4, o5),
      HashCodeUtil.hashCode(o1, o2, o3, o4, o5));
  assertEquals(
      Objects.hashCode(o1, o2, o3, o4, o5, o6),
      HashCodeUtil.hashCode(o1, o2, o3, o4, o5, o6));
}
项目:fresco    文件:ImagePipeline.java   
/**
 * Returns a DataSource supplier that will on get submit the request for execution and return a
 * DataSource representing the pending results of the task.
 *
 * @param imageRequest the request to submit (what to execute).
 * @param callerContext the caller context of the caller of data source supplier
 * @param requestLevel which level to look down until for the image
 * @return a DataSource representing pending results and completion of the request
 */
public Supplier<DataSource<CloseableReference<CloseableImage>>> getDataSourceSupplier(
    final ImageRequest imageRequest,
    final Object callerContext,
    final ImageRequest.RequestLevel requestLevel) {
  return new Supplier<DataSource<CloseableReference<CloseableImage>>>() {
    @Override
    public DataSource<CloseableReference<CloseableImage>> get() {
      return fetchDecodedImage(imageRequest, callerContext, requestLevel);
    }

    @Override
    public String toString() {
      return Objects.toStringHelper(this)
          .add("uri", imageRequest.getSourceUri())
          .toString();
    }
  };
}
项目:fresco    文件:ImagePipeline.java   
/**
 * Returns a DataSource supplier that will on get submit the request for execution and return a
 * DataSource representing the pending results of the task.
 *
 * @param imageRequest the request to submit (what to execute).
 * @return a DataSource representing pending results and completion of the request
 */
public Supplier<DataSource<CloseableReference<PooledByteBuffer>>>
getEncodedImageDataSourceSupplier(
    final ImageRequest imageRequest,
    final Object callerContext) {
  return new Supplier<DataSource<CloseableReference<PooledByteBuffer>>>() {
    @Override
    public DataSource<CloseableReference<PooledByteBuffer>> get() {
      return fetchEncodedImage(imageRequest, callerContext);
    }

    @Override
    public String toString() {
      return Objects.toStringHelper(this)
          .add("uri", imageRequest.getSourceUri())
          .toString();
    }
  };
}
项目:fresco    文件:AbstractDraweeControllerBuilder.java   
/** Creates a data source supplier for the given image request. */
protected Supplier<DataSource<IMAGE>> getDataSourceSupplierForRequest(
    final REQUEST imageRequest,
    final CacheLevel cacheLevel) {
  final Object callerContext = getCallerContext();
  return new Supplier<DataSource<IMAGE>>() {
    @Override
    public DataSource<IMAGE> get() {
      return getDataSourceForRequest(imageRequest, callerContext, cacheLevel);
    }
    @Override
    public String toString() {
      return Objects.toStringHelper(this)
          .add("request", imageRequest.toString())
          .toString();
    }
  };
}
项目:GitHub    文件:PipelineDraweeController.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("super", super.toString())
      .add("dataSourceSupplier", mDataSourceSupplier)
      .toString();
}
项目:GitHub    文件:VolleyDraweeController.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("super", super.toString())
      .add("dataSourceSupplier", mDataSourceSupplier)
      .toString();
}
项目:GitHub    文件:AnimatedFrameCache.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("imageCacheKey", mImageCacheKey)
      .add("frameIndex", mFrameIndex)
      .toString();
}
项目:GitHub    文件:IncreasingQualityDataSourceSupplier.java   
@Override
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof IncreasingQualityDataSourceSupplier)) {
    return false;
  }
  IncreasingQualityDataSourceSupplier that = (IncreasingQualityDataSourceSupplier) other;
  return Objects.equal(this.mDataSourceSuppliers, that.mDataSourceSuppliers);
}
项目:GitHub    文件:FirstAvailableDataSourceSupplier.java   
@Override
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof FirstAvailableDataSourceSupplier)) {
    return false;
  }
  FirstAvailableDataSourceSupplier that = (FirstAvailableDataSourceSupplier) other;
  return Objects.equal(this.mDataSourceSuppliers, that.mDataSourceSuppliers);
}
项目:GitHub    文件:MediaVariations.java   
@Override
public boolean equals(Object o) {
  if (!(o instanceof MediaVariations)) {
    return false;
  }
  MediaVariations otherVariations = (MediaVariations) o;
  return Objects.equal(mMediaId, otherVariations.mMediaId) &&
      mForceRequestForSpecifiedUri == otherVariations.mForceRequestForSpecifiedUri &&
      Objects.equal(mVariants, otherVariations.mVariants);
}
项目:GitHub    文件:MediaVariations.java   
@Override
public boolean equals(Object o) {
  if (!(o instanceof Variant)) {
    return false;
  }
  Variant otherVariant = (Variant) o;
  return Objects.equal(mUri, otherVariant.mUri) &&
      mWidth == otherVariant.mWidth &&
      mHeight == otherVariant.mHeight &&
      mCacheChoice == otherVariant.mCacheChoice;
}
项目:GitHub    文件:ImageRequest.java   
@Override
public boolean equals(Object o) {
  if (!(o instanceof ImageRequest)) {
    return false;
  }
  ImageRequest request = (ImageRequest) o;
  return Objects.equal(mSourceUri, request.mSourceUri) &&
      Objects.equal(mCacheChoice, request.mCacheChoice) &&
      Objects.equal(mMediaVariations, request.mMediaVariations) &&
      Objects.equal(mSourceFile, request.mSourceFile);
}
项目:GitHub    文件:ImageRequest.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("uri", mSourceUri)
      .add("cacheChoice", mCacheChoice)
      .add("decodeOptions", mImageDecodeOptions)
      .add("postprocessor", mPostprocessor)
      .add("priority", mRequestPriority)
      .add("resizeOptions", mResizeOptions)
      .add("rotationOptions", mRotationOptions)
      .add("bytesRange", mBytesRange)
      .add("mediaVariations", mMediaVariations)
      .toString();
}
项目:GitHub    文件:BitmapMemoryCacheKey.java   
@Override
public boolean equals(Object o) {
  if (!(o instanceof BitmapMemoryCacheKey)) {
    return false;
  }
  BitmapMemoryCacheKey otherKey = (BitmapMemoryCacheKey) o;
  return mHash == otherKey.mHash &&
      mSourceString.equals(otherKey.mSourceString) &&
      Objects.equal(this.mResizeOptions, otherKey.mResizeOptions) &&
      Objects.equal(this.mRotationOptions, otherKey.mRotationOptions) &&
      Objects.equal(mImageDecodeOptions, otherKey.mImageDecodeOptions) &&
      Objects.equal(mPostprocessorCacheKey, otherKey.mPostprocessorCacheKey) &&
      Objects.equal(mPostprocessorName, otherKey.mPostprocessorName);
}
项目:GitHub    文件:DraweeHolder.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("controllerAttached", mIsControllerAttached)
      .add("holderAttached", mIsHolderAttached)
      .add("drawableVisible", mIsVisible)
      .add("events", mEventTracker.toString())
      .toString();
}
项目:GitHub    文件:ScaleTypeDrawable.java   
/**
 * Sets the scale type.
 * @param scaleType scale type to set
 */
public void setScaleType(ScaleType scaleType) {
  if (Objects.equal(mScaleType, scaleType)) {
    return;
  }

  mScaleType = scaleType;
  mScaleTypeState = null;
  configureBounds();
  invalidateSelf();
}
项目:GitHub    文件:AbstractDraweeController.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("isAttached", mIsAttached)
      .add("isRequestSubmitted", mIsRequestSubmitted)
      .add("hasFetchFailed", mHasFetchFailed)
      .add("fetchedImage", getImageHash(mFetchedImage))
      .add("events", mEventTracker.toString())
      .toString();
}
项目:fresco    文件:PipelineDraweeController.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("super", super.toString())
      .add("dataSourceSupplier", mDataSourceSupplier)
      .toString();
}
项目:fresco    文件:VolleyDraweeController.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("super", super.toString())
      .add("dataSourceSupplier", mDataSourceSupplier)
      .toString();
}
项目:fresco    文件:AnimatedFrameCache.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("imageCacheKey", mImageCacheKey)
      .add("frameIndex", mFrameIndex)
      .toString();
}
项目:fresco    文件:IncreasingQualityDataSourceSupplier.java   
@Override
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof IncreasingQualityDataSourceSupplier)) {
    return false;
  }
  IncreasingQualityDataSourceSupplier that = (IncreasingQualityDataSourceSupplier) other;
  return Objects.equal(this.mDataSourceSuppliers, that.mDataSourceSuppliers);
}
项目:fresco    文件:FirstAvailableDataSourceSupplier.java   
@Override
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof FirstAvailableDataSourceSupplier)) {
    return false;
  }
  FirstAvailableDataSourceSupplier that = (FirstAvailableDataSourceSupplier) other;
  return Objects.equal(this.mDataSourceSuppliers, that.mDataSourceSuppliers);
}
项目:fresco    文件:MediaVariations.java   
@Override
public boolean equals(Object o) {
  if (!(o instanceof MediaVariations)) {
    return false;
  }
  MediaVariations otherVariations = (MediaVariations) o;
  return Objects.equal(mMediaId, otherVariations.mMediaId) &&
      mForceRequestForSpecifiedUri == otherVariations.mForceRequestForSpecifiedUri &&
      Objects.equal(mVariants, otherVariations.mVariants);
}
项目:fresco    文件:MediaVariations.java   
@Override
public boolean equals(Object o) {
  if (!(o instanceof Variant)) {
    return false;
  }
  Variant otherVariant = (Variant) o;
  return Objects.equal(mUri, otherVariant.mUri) &&
      mWidth == otherVariant.mWidth &&
      mHeight == otherVariant.mHeight &&
      mCacheChoice == otherVariant.mCacheChoice;
}
项目:fresco    文件:ImageRequest.java   
@Override
public boolean equals(Object o) {
  if (!(o instanceof ImageRequest)) {
    return false;
  }
  ImageRequest request = (ImageRequest) o;
  return Objects.equal(mSourceUri, request.mSourceUri) &&
      Objects.equal(mCacheChoice, request.mCacheChoice) &&
      Objects.equal(mMediaVariations, request.mMediaVariations) &&
      Objects.equal(mSourceFile, request.mSourceFile);
}
项目:fresco    文件:ImageRequest.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("uri", mSourceUri)
      .add("cacheChoice", mCacheChoice)
      .add("decodeOptions", mImageDecodeOptions)
      .add("postprocessor", mPostprocessor)
      .add("priority", mRequestPriority)
      .add("resizeOptions", mResizeOptions)
      .add("rotationOptions", mRotationOptions)
      .add("bytesRange", mBytesRange)
      .add("mediaVariations", mMediaVariations)
      .toString();
}
项目:fresco    文件:BitmapMemoryCacheKey.java   
@Override
public boolean equals(Object o) {
  if (!(o instanceof BitmapMemoryCacheKey)) {
    return false;
  }
  BitmapMemoryCacheKey otherKey = (BitmapMemoryCacheKey) o;
  return mHash == otherKey.mHash &&
      mSourceString.equals(otherKey.mSourceString) &&
      Objects.equal(this.mResizeOptions, otherKey.mResizeOptions) &&
      Objects.equal(this.mRotationOptions, otherKey.mRotationOptions) &&
      Objects.equal(mImageDecodeOptions, otherKey.mImageDecodeOptions) &&
      Objects.equal(mPostprocessorCacheKey, otherKey.mPostprocessorCacheKey) &&
      Objects.equal(mPostprocessorName, otherKey.mPostprocessorName);
}
项目:fresco    文件:DraweeHolder.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("controllerAttached", mIsControllerAttached)
      .add("holderAttached", mIsHolderAttached)
      .add("drawableVisible", mIsVisible)
      .add("events", mEventTracker.toString())
      .toString();
}
项目:fresco    文件:ScaleTypeDrawable.java   
/**
 * Sets the scale type.
 * @param scaleType scale type to set
 */
public void setScaleType(ScaleType scaleType) {
  if (Objects.equal(mScaleType, scaleType)) {
    return;
  }

  mScaleType = scaleType;
  mScaleTypeState = null;
  configureBounds();
  invalidateSelf();
}
项目:fresco    文件:ScaleTypeDrawable.java   
/**
 * Sets the focus point.
 * If ScaleType.FOCUS_CROP is used, focus point will attempted to be centered within a view.
 * Each coordinate is a real number in [0,1] range, in the coordinate system where top-left
 * corner of the image corresponds to (0, 0) and the bottom-right corner corresponds to (1, 1).
 * @param focusPoint focus point of the image
 */
public void setFocusPoint(PointF focusPoint) {
  if (Objects.equal(mFocusPoint, focusPoint)) {
    return;
  }

  if (mFocusPoint == null) {
    mFocusPoint = new PointF();
  }

  mFocusPoint.set(focusPoint);
  configureBounds();
  invalidateSelf();
}
项目:fresco    文件:AbstractDraweeController.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("isAttached", mIsAttached)
      .add("isRequestSubmitted", mIsRequestSubmitted)
      .add("hasFetchFailed", mHasFetchFailed)
      .add("fetchedImage", getImageHash(mFetchedImage))
      .add("events", mEventTracker.toString())
      .toString();
}
项目:GitHub    文件:IncreasingQualityDataSourceSupplier.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("list", mDataSourceSuppliers)
      .toString();
}
项目:GitHub    文件:FirstAvailableDataSourceSupplier.java   
@Override
public String toString() {
  return Objects.toStringHelper(this)
      .add("list", mDataSourceSuppliers)
      .toString();
}
项目:GitHub    文件:MediaVariations.java   
@Override
public int hashCode() {
  return Objects.hashCode(mMediaId, mForceRequestForSpecifiedUri, mVariants, mSource);
}
项目:GitHub    文件:ImageRequest.java   
@Override
public int hashCode() {
  return Objects.hashCode(mCacheChoice, mSourceUri, mMediaVariations, mSourceFile);
}
项目:GitHub    文件:IntPair.java   
@Override
public int hashCode() {
  return Objects.hashCode(a, b);
}