Java 类gnu.trove.iterator.hash.TObjectHashIterator 实例源码

项目:fnlp    文件:DictPOS.java   
public void load(String in) throws IOException{

        int begin = in.lastIndexOf("\\");
        int idx = in.indexOf('-',begin);
        if(idx==-1)
            idx = in.indexOf('.',begin);
        if(idx==-1)
            idx = in.length();
        String pos = in.substring(begin+1,idx);
        THashSet<String> set = MyCollection.loadTSet(in);

        TObjectHashIterator<String> it = set.iterator();
        while(it.hasNext()){
            String s = it.next();
            s = s.replaceAll("(\\s| | |\\t)+", "");
            if(s.length()==0)
                continue;
            add(pos, s);    
            String ss = filter(pos,s);
            if(ss!=null){
                add(pos,ss);
            }

        }
    }
项目:xcc    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:xcc    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator(THashMap.this) {
        protected V objectAtIndex(int index) {
            return _values[index];
        }
    };
}
项目:HCFCore    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:HCFCore    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator(THashMap.this) {
        protected V objectAtIndex(int index) {
            return _values[index];
        }
    };
}
项目:HCFCore    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:HCFCore    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator(THashMap.this) {
        protected V objectAtIndex(int index) {
            return _values[index];
        }
    };
}
项目:trove-3.0.3    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        @Override
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:trove-3.0.3    文件:THashMap.java   
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public Iterator<V> iterator() {
    return new TObjectHashIterator(THashMap.this) {
        @Override
        protected V objectAtIndex(int index) {
            return _values[index];
        }
    };
}
项目:easyrec_major    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:easyrec_major    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( THashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:trove-over-koloboke-compile    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:trove-over-koloboke-compile    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator(THashMap.this) {
        protected V objectAtIndex(int index) {
            return _values[index];
        }
    };
}
项目:recalot.com    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:recalot.com    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator(THashMap.this) {
        protected V objectAtIndex(int index) {
            return _values[index];
        }
    };
}
项目:gnu.trove    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:gnu.trove    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator(THashMap.this) {
        protected V objectAtIndex(int index) {
            return _values[index];
        }
    };
}
项目:fnlp    文件:Dictionary.java   
/**
 * 从文件中读取
 * @param path 文件路径
 * @param tag 词典名
 * @throws IOException 
 */
public void load(String path,String tag) throws IOException{
    if(path == null) return;
    dict = MyCollection.loadTSet(path);
    maxLen = 0;
    TObjectHashIterator<String> it = dict.iterator();
    while(it.hasNext()){
        String k = it.next();
        if(k.length()>maxLen){
            maxLen = k.length();
        }
    }       
    name = tag;     
}
项目:fnlp    文件:JaccardSimilarity.java   
public float calc(THashSet<Object> s1, THashSet<Object> s2) {
    int com = 0;
    if (s1 == null || s2 == null)
        return 0;
    TObjectHashIterator<Object> it = s1.iterator();
    for ( int i = s1.size(); i-- > 0; ) {
        Object v = it.next();
        if(s2.contains(v))
            com++;
    }
    float sim = ((float) com)/(s1.size()+s2.size()-com);
    return sim;
}
项目:fnlp    文件:MyCollection.java   
public static void TSet2List(THashSet<String> newset, ArrayList<String> al) {
    TObjectHashIterator<String> it = newset.iterator();
    while(it.hasNext()){
        String s = it.next();
        al.add(s);
    }

}
项目:fnlp    文件:MyCollection.java   
public static int getLength(THashSet<String> set) {
    int i = 0;
    TObjectHashIterator<String> it = set.iterator();
    while(it.hasNext()){
        String s = it.next();
        if(s.length()>i)
            i=s.length();
    }
    return i;
}
项目:easyrec-PoC    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:easyrec-PoC    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( THashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:easyrec    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:easyrec    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( THashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:trove    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this ) {
        protected V objectAtIndex( int index ) {
            return _values[index];
        }
    };
}
项目:trove    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<V> iterator() {
    return new TObjectHashIterator(THashMap.this) {
        protected V objectAtIndex(int index) {
            return _values[index];
        }
    };
}
项目:fudannlp    文件:Dictionary.java   
/**
 * 从文件中读取
 * @param path 文件路径
 * @param tag 词典名
 * @throws IOException 
 */
public void load(String path,String tag) throws IOException{
    if(path == null) return;
    dict = MyCollection.loadTSet(path);
    maxLen = 0;
    TObjectHashIterator<String> it = dict.iterator();
    while(it.hasNext()){
        String k = it.next();
        if(k.length()>maxLen){
            maxLen = k.length();
        }
    }       
    name = tag;     
}
项目:fudannlp    文件:JaccardSimilarity.java   
public float calc(THashSet<Object> s1, THashSet<Object> s2) {
    int com = 0;
    if (s1 == null || s2 == null)
        return 0;
    TObjectHashIterator<Object> it = s1.iterator();
    for ( int i = s1.size(); i-- > 0; ) {
        Object v = it.next();
        if(s2.contains(v))
            com++;
    }
    float sim = ((float) com)/(s1.size()+s2.size()-com);
    return sim;
}
项目:fudannlp    文件:MyCollection.java   
public static void TSet2List(THashSet<String> newset, ArrayList<String> al) {
    TObjectHashIterator<String> it = newset.iterator();
    while(it.hasNext()){
        String s = it.next();
        al.add(s);
    }

}
项目:fudannlp    文件:MyCollection.java   
public static int getLength(THashSet<String> set) {
    int i = 0;
    TObjectHashIterator<String> it = set.iterator();
    while(it.hasNext()){
        String s = it.next();
        if(s.length()>i)
            i=s.length();
    }
    return i;
}
项目:xcc    文件:TObjectFloatHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<K> iterator() {
    return new TObjectHashIterator( TObjectFloatHashMap.this );
}
项目:xcc    文件:TObjectIntHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<K> iterator() {
    return new TObjectHashIterator( TObjectIntHashMap.this );
}
项目:xcc    文件:TObjectShortHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<K> iterator() {
    return new TObjectHashIterator( TObjectShortHashMap.this );
}
项目:xcc    文件:TCustomHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<K> iterator() {
    return new TObjectHashIterator( TCustomHashMap.this );
}
项目:xcc    文件:THashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<K> iterator() {
    return new TObjectHashIterator<K>(THashMap.this);
}
项目:xcc    文件:TObjectByteHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<K> iterator() {
    return new TObjectHashIterator( TObjectByteHashMap.this );
}
项目:xcc    文件:TObjectDoubleHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<K> iterator() {
    return new TObjectHashIterator( TObjectDoubleHashMap.this );
}
项目:xcc    文件:TObjectLongHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<K> iterator() {
    return new TObjectHashIterator( TObjectLongHashMap.this );
}
项目:xcc    文件:TObjectCharHashMap.java   
@SuppressWarnings({"unchecked"})
public Iterator<K> iterator() {
    return new TObjectHashIterator( TObjectCharHashMap.this );
}