示例#1
0
 private boolean equals(final KeyboardId other) {
   if (other == this) return true;
   return other.mElementId == mElementId
       && other.mMode == mMode
       && other.mWidth == mWidth
       && other.mHeight == mHeight
       && other.passwordInput() == passwordInput()
       && other.mClobberSettingsKey == mClobberSettingsKey
       && other.mHasShortcutKey == mHasShortcutKey
       && other.mLanguageSwitchKeyEnabled == mLanguageSwitchKeyEnabled
       && other.isMultiLine() == isMultiLine()
       && other.imeAction() == imeAction()
       && TextUtils.equals(other.mCustomActionLabel, mCustomActionLabel)
       && other.navigateNext() == navigateNext()
       && other.navigatePrevious() == navigatePrevious()
       && other.mSubtype.equals(mSubtype)
       && other.mIsSplitLayout == mIsSplitLayout;
 }
示例#2
0
 private static int computeHashCode(final KeyboardId id) {
   return Arrays.hashCode(
       new Object[] {
         id.mElementId,
         id.mMode,
         id.mWidth,
         id.mHeight,
         id.passwordInput(),
         id.mClobberSettingsKey,
         id.mHasShortcutKey,
         id.mLanguageSwitchKeyEnabled,
         id.isMultiLine(),
         id.imeAction(),
         id.mCustomActionLabel,
         id.navigateNext(),
         id.navigatePrevious(),
         id.mSubtype,
         id.mIsSplitLayout
       });
 }