关闭订单
@param closeorder closeorder
@param key 商户支付密钥
@return MchBaseResult
2446
public static MchBaseResult payCloseorder(Closeorder closeorder,String key){
		Map<String,String> map = MapUtil.objectToMap(closeorder);
		String sign = SignatureUtil.generateSign(map,closeorder.getSign_type(),key);
		closeorder.setSign(sign);
		String closeorderXML = XMLConverUtil.convertToXML(closeorder);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(xmlHeader)
				.setUri(baseURI()+ "/pay/closeorder")
				.setEntity(new StringEntity(closeorderXML,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.executeXmlResult(httpUriRequest,MchBaseResult.class,closeorder.getSign_type(),key);
	}
440279
public static <T extends Comparable<? super T>> int binarySearch(final List<? extends T> c, final T key) {
        return Array.binarySearch(c, key);
    }
505419
public BinaryStore findBinaryStoreContainingKey( BinaryKey key ) {
        Iterator<Map.Entry<String, BinaryStore>> binaryStoreIterator = getNamedStoreIterator();

        while (binaryStoreIterator.hasNext()) {
            BinaryStore bs = binaryStoreIterator.next().getValue();
            if (bs.hasBinary(key)) {
                return bs;
            }
        }

        return null;
    }
362569
public static <T> CloseableReference<T> closeableFrom(@WillNotClose @Nullable final T reference, Closer<T> closer) {
        return new CloseableReference<>(reference, closer);
    }
108691
@Nullable
  public CloseableReference<V> reuse(K key) {
    Preconditions.checkNotNull(key);
    CloseableReference<V> clientRef = null;
    boolean removed = false;
    Entry<K, V> oldExclusive = null;
    synchronized (this) {
      oldExclusive = mExclusiveEntries.remove(key);
      if (oldExclusive != null) {
        Entry<K, V> entry = mCachedEntries.remove(key);
        Preconditions.checkNotNull(entry);
        Preconditions.checkState(entry.clientCount == 0);
        // optimization: instead of cloning and then closing the original reference,
        // we just do a move
        clientRef = entry.valueRef;
        removed = true;
      }
    }
    if (removed) {
      maybeNotifyExclusiveEntryRemoval(oldExclusive);
    }
    return clientRef;
  }
976145
public void close(K key) {

        LettuceAssert.notNull(key, "ConnectionKey must not be null!");

        Sync<K, T, F> sync = connections.get(key);
        if (sync != null) {
            connections.remove(key);
            sync.doWithConnection(AsyncCloseable::closeAsync);
        }
    }
752299
public RootMethodRunResult getRunResultByRootMethodKey(String key) {
        if (key == null) {
            throw new NullPointerException();
        }
        for (RootMethodRunResult rootMethodRunResult : rootMethodRunResults) {
            if ((rootMethodRunResult.getRootMethod() != null)
                    && key.equals(rootMethodRunResult.getRootMethod().getKey())) {
                return rootMethodRunResult;
            }
        }
        return null;
    }
239559
public OMVRBTreeEntry<K, V> getHigherEntry(final K key) {
    final OMVRBTreeEntry<K, V> p = getEntry(key, true, PartialSearchMode.HIGHEST_BOUNDARY);

    if (p == null)
      return null;

    if (pageItemFound)
      // MATCH, RETURN THE NEXT ONE
      return next(p);
    else if (pageIndex < p.getSize())
      // NOT MATCHED, POSITION IS ALREADY TO THE NEXT ONE
      return p;

    return null;
  }
1157128
public <S, T> ToMarshaller<S, T> findMarshaller(ConverterKey<S,T> key) {

		Converter<S,T> converter = findConverter(key);
		
		if (converter == null) {
			return null;
		}
		
		if (ToMarshallerConverter.class.isAssignableFrom(converter.getClass())) {
			return ((ToMarshallerConverter<S, T>)converter).getMarshaller();
		} else {
			return new ConverterToMarshaller<S, T>(converter);
		}
	}
297346
def order_by(self, key):
        
        if key is None:
            raise NullArgumentError(u"No key for sorting given")
        kf = [OrderingDirection(key, reverse=False)]
        return SortedEnumerable3(kf, self._data)
1191572
Bucket getBucketForKey(Object key)
    {
        int index = getBucketIndexForKey(key);

        Bucket bucket = buckets[index];
        if (bucket == null)
        {
            synchronized (bucketLock)
            {
                bucket = buckets[index];
            }
        }

        return bucket;
    }
1372862
public static Map getOrCreateChildMap(Map parent, String key) {
        Object o = parent.get(key);
        if(o instanceof Map) {
            return (Map)o;
        }
        return new LinkedHashMap();
    }
646022
private SortKey toggle(SortKey key)
    {
        if (key.getSortOrder() == SortOrder.ASCENDING)
        {
            return new SortKey(key.getColumn(), SortOrder.DESCENDING);
        }
        return new SortKey(key.getColumn(), SortOrder.ASCENDING);
    }
396667
public Map<String, String> orderQueryBuild() {
		Map<String, String> map = new HashMap<String, String>();
		if (getPayModel().equals(PayModel.SERVICEMODE)) {
			map.put("sub_mch_id", getSubMchId());
			map.put("sub_appid", getSubAppId());
		}

		map.put("appid", getAppId());
		map.put("mch_id", getMchId());

		if (StrKit.notBlank(getTransactionId())) {
			map.put("transaction_id", getTransactionId());
		} else {
			if (StrKit.isBlank(getOutTradeNo())) {
				throw new IllegalArgumentException("out_trade_no,transaction_id 不能同时为空");
			}
			map.put("out_trade_no", getOutTradeNo());
		}
		map.put("nonce_str", String.valueOf(System.currentTimeMillis()));
		map.put("sign", PaymentKit.createSign(map, getPaternerKey()));
		return map;
	}
562723
public StorableIndex<S> findKeyIndex(StorableKey<S> key) {
        if (key == null) {
            throw new IllegalArgumentException();
        }

        Set<? extends OrderedProperty<S>> orderedProps = key.getProperties();

        Set<StorableProperty<S>> keyProps = new HashSet<StorableProperty<S>>();
        for (OrderedProperty<S> orderedProp : orderedProps) {
            keyProps.add(orderedProp.getChainedProperty().getPrimeProperty());
        }

        search: for (StorableIndex<S> index : this) {
            if (!index.isUnique() || index.getPropertyCount() != keyProps.size()) {
                continue search;
            }
            for (int i=index.getPropertyCount(); --i>=0; ) {
                if (!keyProps.contains(index.getProperty(i))) {
                    continue search;
                }
            }
            return index;
        }

        return null;
    }
1046076
public List<Order> create(OrderBy order) {
        List<Order> list = new ArrayList<>();

        for (SortSpecification sort : order.getSort()) {
            if (sort.getSortOrder() == SortOrder.DESC) {
                list.add(cb.desc(root.get(sort.getKey())));
            } else if (sort.getSortOrder() == SortOrder.ASC) {
                list.add(cb.asc(root.get(sort.getKey())));
            }
        }

        return list;
    }
146399
public static Specification<JpaDistributionSetType> byKey(final String key) {
        return (targetRoot, query, cb) -> cb.equal(targetRoot.<String> get(JpaDistributionSetType_.key), key);
    }