Java 类gnu.trove.map.TCharObjectMap 实例源码

项目:FlexMC    文件:CompiledShape.java   
public CompiledShape( TCharObjectMap<ItemStack> match, String... lines ) {
    match.putIfAbsent( '0', null );
    char[][] array = new char[ lines.length ][];
    int lastLength = -1;
    for( int i = 0; i < lines.length; i++ ) {
        array[ i ] = lines[ i ].toCharArray();
        if( lastLength != -1 && lastLength != lines[ i ].length() ) {
               throw new IllegalArgumentException( "Not equal length of lines" );
        }
        lastLength = lines[ i ].length();
        for( char c : lines[ i ].toCharArray() ) {
            if( !match.containsKey( c ) ) {
                throw new IllegalArgumentException( "Invalid char " + c );
            }
        }
    }
    this.shape = new ItemStack[ array.length ][];
    for( int i = 0; i < array.length; i++ ) {
        char[] b = array[ i ];
        ItemStack[] r = new ItemStack[ b.length ];
        for( int k = 0; k < r.length; k++ ) {
            r[ k ] = match.get( b[ k ] );
        }
        shape[ i ] = r;
    }
}
项目:xcc    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TCharObjectMap ) ) {
        return false;
    }
    TCharObjectMap that = ( TCharObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TCharObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            char key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:xcc    文件:TCharObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TCharObjectMap<V> ) in.readObject();
}
项目:HCFCore    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TCharObjectMap ) ) {
        return false;
    }
    TCharObjectMap that = ( TCharObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TCharObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            char key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:HCFCore    文件:TCharObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TCharObjectMap<V> ) in.readObject();
}
项目:HCFCore    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TCharObjectMap ) ) {
        return false;
    }
    TCharObjectMap that = ( TCharObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TCharObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            char key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:HCFCore    文件:TCharObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TCharObjectMap<V> ) in.readObject();
}
项目:trove-3.0.3    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
@Override
@SuppressWarnings("rawtypes")
public boolean equals( Object other ) {
    if ( ! ( other instanceof TCharObjectMap ) ) {
        return false;
    }
    TCharObjectMap that = ( TCharObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TCharObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            char key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:trove-3.0.3    文件:TCharObjectMapDecorator.java   
@Override
@SuppressWarnings("unchecked")
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TCharObjectMap<V> ) in.readObject();
}
项目:easyrec_major    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TCharObjectMap ) ) {
        return false;
    }
    TCharObjectMap that = ( TCharObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TCharObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            char key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec_major    文件:TCharObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TCharObjectMap<V> ) in.readObject();
}
项目:recalot.com    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TCharObjectMap ) ) {
        return false;
    }
    TCharObjectMap that = ( TCharObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TCharObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            char key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:recalot.com    文件:TCharObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TCharObjectMap<V> ) in.readObject();
}
项目:easyrec-PoC    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TCharObjectMap ) ) {
        return false;
    }
    TCharObjectMap that = ( TCharObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TCharObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            char key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec-PoC    文件:TCharObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TCharObjectMap<V> ) in.readObject();
}
项目:easyrec    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TCharObjectMap ) ) {
        return false;
    }
    TCharObjectMap that = ( TCharObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TCharObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            char key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec    文件:TCharObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TCharObjectMap<V> ) in.readObject();
}
项目:RPG-Items-2    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TCharObjectMap ) ) {
        return false;
    }
    TCharObjectMap that = ( TCharObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TCharObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            char key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:xcc    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TCharObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:HCFCore    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TCharObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:HCFCore    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TCharObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:trove-3.0.3    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
@Override
public void putAll( TCharObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:easyrec_major    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TCharObjectMap<V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:recalot.com    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TCharObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:easyrec-PoC    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TCharObjectMap<V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:easyrec    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TCharObjectMap<V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:RPG-Items-2    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TCharObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:xcc    文件:TCharObjectHashMap.java   
/**
 * Creates a new <code>TCharObjectHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TCharObjectMap</tt> to be copied.
 */
public TCharObjectHashMap( TCharObjectMap<? extends V> map ) {
    this( map.size(), 0.5f, map.getNoEntryKey() );
    putAll( map );
}
项目:xcc    文件:TCharObjectMapDecorator.java   
/**
 * Creates a wrapper that decorates the specified primitive map.
 *
 * @param map the <tt>TCharObjectMap</tt> to wrap.
 */
public TCharObjectMapDecorator( TCharObjectMap<V> map ) {
    super();
    this._map = map;
}
项目:xcc    文件:TCharObjectMapDecorator.java   
/**
 * Returns a reference to the map wrapped by this decorator.
 *
 * @return the wrapped <tt>TCharObjectMap</tt> instance.
 */
public TCharObjectMap<V> getMap() {
    return _map;
}
项目:HCFCore    文件:TCharObjectHashMap.java   
/**
 * Creates a new <code>TCharObjectHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TCharObjectMap</tt> to be copied.
 */
public TCharObjectHashMap( TCharObjectMap<? extends V> map ) {
    this( map.size(), 0.5f, map.getNoEntryKey() );
    putAll( map );
}
项目:HCFCore    文件:TCharObjectMapDecorator.java   
/**
 * Creates a wrapper that decorates the specified primitive map.
 *
 * @param map the <tt>TCharObjectMap</tt> to wrap.
 */
public TCharObjectMapDecorator( TCharObjectMap<V> map ) {
    super();
    this._map = map;
}
项目:HCFCore    文件:TCharObjectMapDecorator.java   
/**
 * Returns a reference to the map wrapped by this decorator.
 *
 * @return the wrapped <tt>TCharObjectMap</tt> instance.
 */
public TCharObjectMap<V> getMap() {
    return _map;
}
项目:HCFCore    文件:TCharObjectHashMap.java   
/**
 * Creates a new <code>TCharObjectHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TCharObjectMap</tt> to be copied.
 */
public TCharObjectHashMap( TCharObjectMap<? extends V> map ) {
    this( map.size(), 0.5f, map.getNoEntryKey() );
    putAll( map );
}
项目:HCFCore    文件:TCharObjectMapDecorator.java   
/**
 * Creates a wrapper that decorates the specified primitive map.
 *
 * @param map the <tt>TCharObjectMap</tt> to wrap.
 */
public TCharObjectMapDecorator( TCharObjectMap<V> map ) {
    super();
    this._map = map;
}
项目:HCFCore    文件:TCharObjectMapDecorator.java   
/**
 * Returns a reference to the map wrapped by this decorator.
 *
 * @return the wrapped <tt>TCharObjectMap</tt> instance.
 */
public TCharObjectMap<V> getMap() {
    return _map;
}
项目:Browscap4j    文件:TCharObjectSinglentonMap.java   
@Override
public void putAll(TCharObjectMap map) {

}
项目:trove-3.0.3    文件:TCharObjectHashMap.java   
/**
 * Creates a new <code>TCharObjectHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TCharObjectMap</tt> to be copied.
 */
public TCharObjectHashMap( TCharObjectMap<? extends V> map ) {
    this( map.size(), 0.5f, map.getNoEntryKey() );
    putAll( map );
}
项目:trove-3.0.3    文件:TCharObjectMapDecorator.java   
/**
 * Creates a wrapper that decorates the specified primitive map.
 *
 * @param map the <tt>TCharObjectMap</tt> to wrap.
 */
public TCharObjectMapDecorator( TCharObjectMap<V> map ) {
    super();
    this._map = map;
}
项目:trove-3.0.3    文件:TCharObjectMapDecorator.java   
/**
 * Returns a reference to the map wrapped by this decorator.
 *
 * @return the wrapped <tt>TCharObjectMap</tt> instance.
 */
public TCharObjectMap<V> getMap() {
    return _map;
}