AbstractMap isEmpty - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for AbstractMap isEmpty method.

This code example shows how to use the following methods:isEmpty
        } 
        return count;
    } 
 
    public boolean isEmpty() { 
        return wrappedMap.isEmpty();
    } 
 
    public void clear() { 
        wrappedMap.clear();
    } 
 
    public SortedSet<String> remove(Object key) {
        return wrappedMap.remove(key);
    } 
 
    public Set<String> keySet() {
        return wrappedMap.keySet();
    } 
 
7
CodeRank
This code example shows how to use the following methods:isEmpty
    } 
 
    @Override 
    final ExpressionBasedFilterInvocationSecurityMetadataSource createMetadataSource(H http) {
        LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>> requestMap = REGISTRY.createRequestMap();
        if(requestMap.isEmpty()) {
            throw new IllegalStateException("At least one mapping is required (i.e. authorizeRequests().anyRequest.authenticated())");
        } 
        return new ExpressionBasedFilterInvocationSecurityMetadataSource(requestMap, getExpressionHandler(http));
    } 
 
    private SecurityExpressionHandler<FilterInvocation> getExpressionHandler(H http) {
        if(expressionHandler == null) {
            DefaultWebSecurityExpressionHandler defaultHandler = new DefaultWebSecurityExpressionHandler();
            AuthenticationTrustResolver trustResolver = http.getSharedObject(AuthenticationTrustResolver.class);
            if(trustResolver != null) {
                defaultHandler.setTrustResolver(trustResolver);
            } 
            expressionHandler = postProcess(defaultHandler);
        } 
6
CodeRank
This code example shows how to use the following methods:isEmpty
	@Override 
	public boolean isEmpty() 
	{ 
		_r.lock(); 
		try { 
			return _objectMap.isEmpty(); 
		} 
		finally { _r.unlock(); } 
	} 
 
	/** 
	 * @see net.sf.l2j.util.L2ObjectMap#clear() 
	 */ 
	@Override 
	public void clear() 
	{ 
		_w.lock(); 
		try { 
			_objectMap.clear(); 
		} 
5
CodeRank
This code example shows how to use the following methods:isEmpty, ceilingKey, containsKey, firstKey, get
 
 
    private String findConsumerByPartition(final TreeMap<Long, String> consumerMap, final String partition) {
        final Long hash = this.alg.hash(partition);
        Long target = hash;
        if (!consumerMap.containsKey(hash)) {
            target = consumerMap.ceilingKey(hash);
            // if (hash == null) { 
            // target = consumerMap.floorKey(hash); 
            // } 
            // else { 
            // final Long floor = consumerMap.floorKey(hash); 
            // if (floor != null) { 
            // target = Math.abs(hash - floor) > Math.abs(hash - target) ? 
            // target : floor; 
            // } 
            // } 
            if (target == null && !consumerMap.isEmpty()) {
                target = consumerMap.firstKey();
            } 

7
CodeRank
This code example shows how to use the following methods:isEmpty, lastKey, put
     * Adds the given value to the "end" of the threshold map, that is, with the 
     * greatest index/key. 
     */ 
    protected void append(final Integer value) {
        Integer addIdx = null;
        if (thresh.isEmpty()) {
            addIdx = 0;
        } else { 
            final Integer lastKey = thresh.lastKey();
            addIdx = lastKey + 1;
        } 
        thresh.put(addIdx, value);
    } 
 
    /** 
     * Inserts the given values into the threshold map. 
     */ 
    protected Integer insert(final Integer j, Integer k) {
        if (isNonzero(k) && isGreaterThan(k, j) && isLessThan(k - 1, j)) {
            thresh.put(k, j);
6
CodeRank
This code example shows how to use the following methods:isEmpty, pollFirstEntry
    /** 
     * @return removes the smallest entry (key and value) from this collection 
     */ 
    public int pollKey() 
    { 
        if (map.isEmpty())
            throw new IllegalStateException("Cannot poll collection is empty!");
 
        long key = map.pollFirstEntry().getKey();
        return (int) (key & 0xFFFFFFFFL);
    } 
 
    public int getSize() 
    { 
        return map.size();
    } 
 
    public boolean isEmpty() 
    { 
        return map.isEmpty();
6
CodeRank
This code example shows how to use the following methods:isEmpty, lastEntry
    public RotatingTransactionalState(TransactionalState state, String subdir) {
        this(state, subdir, false);
    } 
     
    public Object getLastState() { 
        if(_curr.isEmpty()) return null; 
        else return _curr.lastEntry().getValue(); 
    } 
     
    public void overrideState(BigInteger txid, Object state) {
        _state.setData(txPath(txid), state);
        _curr.put(txid, state);
    } 
 
    public void removeState(BigInteger txid) {
        if(_curr.containsKey(txid)) {
            _curr.remove(txid);
            _state.delete(txPath(txid));
        } 
    } 
5
CodeRank
This code example shows how to use the following methods:isEmpty
	public int hashCode() { 
		return treeMap.hashCode();
	} 
 
	public boolean isEmpty() { 
		return treeMap.isEmpty();
	} 
 
	public Set<Key> keySet() {
		return treeMap.keySet();
	} 
 
	public int size() { 
		return treeMap.size();
	} 
 
	@Override 
	public String toString() {
		return treeMap.toString();
	} 
5
CodeRank
This code example shows how to use the following methods:isEmpty
        } 
        return count;
    } 
 
    public boolean isEmpty() { 
        return wrappedMap.isEmpty();
    } 
 
    public void clear() { 
        wrappedMap.clear();
    } 
 
    public SortedSet<String> remove(Object key) {
        return wrappedMap.remove(key);
    } 
 
    public Set<String> keySet() {
        return wrappedMap.keySet();
    } 
 
5
CodeRank
This code example shows how to use the following methods:isEmpty, put
	} 
 
	public TreeMap<Integer, String> getProsodyList() {
		TreeMap<Integer, String> list = workingDocument.getBlockList();
 
		if(list.isEmpty()) {
			// should never happen 
			list.put(0, "");
			System.out.println("empty working document sent to sketch");
		} 
		return list;
	} 
 
	public ProsodyElement getWorkingBlock(int key) {
		workingBlock = workingDocument.getBlock(key);
		return workingBlock;
	} 
 
	public void exportAudioFile() { 
		if (wavFileChooser.showSaveDialog(mainFrame) == JFileChooser.APPROVE_OPTION) { 
4
CodeRank
isEmpty Method Overview
Returns true if this map contains no key-value mappings.
See Code Examples for other Java 8 AbstractMap Methods: