*
Find a PagSeguroPaymentMode in a list
@param value
@return PagSeguroPaymentMode the corresponding to the informed value
549793
public static function fromValue($value)
    {
        try {
            return array_search(strtoupper($value), $this->modeList);
        } catch (Exception $e) {
            return null;
        }
    }
1083646
public static String getPostfixFromValue(String value) {
    String postfix = "";
    Matcher m = patternPrePostFix.matcher(value);
    if (m.find()) {
      postfix = m.group(2);

    }
    return postfix;
  }
1323929
@Override
	public List<CommerceCurrency> findByG_P_A(long groupId, boolean primary,
		boolean active) {
		return findByG_P_A(groupId, primary, active, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
104828
public boolean containsValue(final int value)
    {
        boolean found = false;
        if (value != missingValue)
        {
            final int[] entries = this.entries;
            @DoNotSub final int length = entries.length;

            for (@DoNotSub int valueIndex = 1; valueIndex < length; valueIndex += 2)
            {
                if (value == entries[valueIndex])
                {
                    found = true;
                    break;
                }
            }
        }

        return found;
    }
485949
public boolean remove(final int value)
    {
        if (value == MISSING_VALUE)
        {
            final boolean previousContainsMissingValue = this.containsMissingValue;
            containsMissingValue = false;
            return previousContainsMissingValue;
        }

        final int[] values = this.values;
        @DoNotSub final int mask = values.length - 1;
        @DoNotSub int index = Hashing.hash(value, mask);

        while (values[index] != MISSING_VALUE)
        {
            if (values[index] == value)
            {
                values[index] = MISSING_VALUE;
                compactChain(index);
                sizeOfArrayValues--;
                return true;
            }

            index = next(index, mask);
        }

        return false;
    }
787839
private Object manageListIfNecessary(List<Object> value) {
		boolean containsRuntimeRefs = false;
		for (ListIterator<Object> i = value.listIterator(); i.hasNext();) {
			Object e = i.next();
			if(e instanceof RuntimeBeanReference) {
				containsRuntimeRefs = true;
			}
            if (e instanceof BeanConfiguration) {
                BeanConfiguration c = (BeanConfiguration) e;
                i.set(c.getBeanDefinition());
                containsRuntimeRefs = true;
            }
        }
		if(containsRuntimeRefs) {
			List tmp = new ManagedList();
			tmp.addAll(value);
			value = tmp;
		}
		return value;
	}
343475
public Postcard withStringArrayList(@Nullable String key, @Nullable ArrayList<String> value) {
        mBundle.putStringArrayList(key, value);
        return this;
    }
463558
@Override
    public boolean containsValue(Object value) {
        try {
            lockAllSegments();
            for (LinkedHashMapSegment<K, V> seg : segments) {
                if (seg.containsValue(value))
                    return true;
            }
            return false;
        } finally {
            unlockAllSegments();
        }
    }
1043514
public static Mode parse(String value) {
    if (StringUtils.isBlank(value)) {
      throw new IllegalArgumentException(ExceptionMessage.INVALID_MODE.getMessage(value));
    }

    try {
      return parseNumeric(value);
    } catch (NumberFormatException e) {
      // Treat as symbolic
      return parseSymbolic(value);
    }
  }
549403
public FindOptions modifier(final String key, final Object value) {
        options.getModifiers().put(key, value);
        return this;
    }
316954
public function accept($value, $mode = 1)
    {
        $this->items = array_filter($this->items, function ($item) use ($value, $mode) {
            return $item === $value;
        }, $mode);

        return $this;
    }
954400
public static Collection<AnnotationValue> resolveTypeQualifiers(AnnotationValue value) {
        LinkedList<AnnotationValue> result = new LinkedList<>();
        resolveTypeQualifierNicknames(value, result, new LinkedList<ClassDescriptor>());
        return result;
    }
756685
public function setPaymentExecutionDetail($value)
    {
        if (!$this->_isNumericArray($value)) {
            $value = array ($value);
        }
        $this->_fields['PaymentExecutionDetail']['FieldValue'] = $value;
        return $this;
    }
636512
public static function CreditCard ($value, $options) {
		//
		$number_pattern_list	= [
			'American Express'	=> [
				"/^34[0-9]{13}$/",
				"/^37[0-9]{13}$/",
			],
			'China UnionPay'	=> [
				"/^62212[6-9][0-9]{10}$/",
				"/^6221[3-9][0-9][0-9]{10}$/",
				"/^622[2-8] [0-9]{12}$/",
				"/^6229[01][0-9][0-9]{10}$/",
				"/^62292[0-5][0-9]{10}$/",
				"/^62[4-6][0-9]{13}$/",
				"/^628[2-8][0-9]{12}$/",
			],
			'Diners Club International'	=> [
				"/^300[0-9]{11}$/",
				"/^305[0-9]{11}$/",
				"/^3095[0-9]{10}$/",
				"/^36[0-9]{11}$/",
				"/^3[89][0-9]{12}$/",
			],
			'Discover Card'	=> [
				"/^60110[0-9]{11}$/",
				"/^6011[2-4][0-9]{11}$/",
				"/^60117[4-9][0-9]{10}$/",
				"/^60118[6-9][0-9]{10}$/",
				"/^60119[0-9][0-9]{10}$/",
				"/^64[4-9][0-9]{13}$/",
				"/^65[0-9]{14}$/",
			],
			'JCB'	=> [
				"/^352[89][0-9]{12}$/",
				"/^35[3-7][0-9]{12}$/",
				"/^358[1-9][0-9]{12}$/",
			],
			'MasterCard'	=> [
				"/^5[0-9]{15}$/",
			],
			'UATP'			=> [
				"/^1[0-9]{14}$/",
			],
			'Visa'			=> [
				"/^4[0-9]{13}(?:[0-9]{3})?$/",
			],
		];

		foreach ($number_pattern_list as $card_name => $pattern_list) {
			foreach ($pattern_list as $pattern) {
				if (1 === preg_match($pattern, $value)) {
					//チェックディジット
					for ($i = 0, $value = strrev($value), $alt = true, $total = 0; ($str = substr($value, $i, 1)) !== false;$total += $alt ? $str : ($str < 5 ? $str * 2 : 1 + ($str - 5) * 2), $alt = !$alt, $i++);
					return $total % 10 === 0;
				}
			}
		}

		return false;
	}
1077418
public static @Nullable PorterDuff.Mode parseTintMode(int value,
                                                          @Nullable PorterDuff.Mode defaultMode) {
        switch (value) {
            case 3: return PorterDuff.Mode.SRC_OVER;
            case 5: return PorterDuff.Mode.SRC_IN;
            case 9: return PorterDuff.Mode.SRC_ATOP;
            case 14: return PorterDuff.Mode.MULTIPLY;
            case 15: return PorterDuff.Mode.SCREEN;
            case 16: return PorterDuff.Mode.ADD;
            default: return defaultMode;
        }
    }
454073
public boolean containsValue(Object value) {
        if (value == null) {
            value = new Null();
        }

        Entry tab[] = mTable;
        
        for (int i = tab.length ; i-- > 0 ;) {
            for (Entry e = tab[i], prev = null; e != null; e = e.mNext) {
                Object entryValue = e.getValue();

                if (entryValue == null) {
                    // Clean up after a cleared Reference.
                    mModCount++;
                    if (prev != null) {
                        prev.mNext = e.mNext;
                    }
                    else {
                        tab[i] = e.mNext;
                    }
                    mCount--;
                }
                else if (value.equals(entryValue)) {
                    return true;
                }
                else {
                    prev = e;
                }
            }
        }

        return false;
    }
450585
private Object manageMapIfNecessary(Map<Object, Object> value) {
		boolean containsRuntimeRefs = false;
        for (Entry<Object, Object> e : value.entrySet()) {
            Object v = e.getValue();
            if (v instanceof RuntimeBeanReference) {
                containsRuntimeRefs = true;
            }
            if (v instanceof BeanConfiguration) {
                BeanConfiguration c = (BeanConfiguration) v;
                e.setValue(c.getBeanDefinition());
                containsRuntimeRefs = true;
            }
        }
		if(containsRuntimeRefs) {
//			return new ManagedMap(map);
            ManagedMap m = new ManagedMap();
            m.putAll(value);
            return m;
        }
		return value;
	}