@Override
  public boolean checkAndSet(String value, FolderConfiguration config) {
    ScreenSize size = ScreenSize.getEnum(value);
    if (size != null) {
      ScreenSizeQualifier qualifier = new ScreenSizeQualifier(size);
      config.setScreenSizeQualifier(qualifier);
      return true;
    }

    return false;
  }
Пример #2
0
 @Override
 public int hashCode() {
   int hash = 17;
   hash = 31 * hash + mScreenSize.ordinal();
   long f = Double.doubleToLongBits(mDiagonalLength);
   hash = 31 * hash + (int) (f ^ (f >>> 32));
   hash = 31 * hash + mPixelDensity.ordinal();
   hash = 31 * hash + mScreenRatio.ordinal();
   hash = 31 * hash + mXDimension;
   hash = 31 * hash + mYDimension;
   f = Double.doubleToLongBits(mXdpi);
   hash = 31 * hash + (int) (f ^ (f >>> 32));
   f = Double.doubleToLongBits(mYdpi);
   hash = 31 * hash + (int) (f ^ (f >>> 32));
   hash = 31 * hash + mMultitouch.ordinal();
   hash = 31 * hash + mMechanism.ordinal();
   hash = 31 * hash + mScreenType.ordinal();
   if (mScreenRound != null) {
     hash = 31 * hash + mScreenRound.ordinal();
   }
   return hash;
 }