• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Map1类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.hp.hpl.jena.util.iterator.Map1的典型用法代码示例。如果您正苦于以下问题:Java Map1类的具体用法?Java Map1怎么用?Java Map1使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Map1类属于com.hp.hpl.jena.util.iterator包,在下文中一共展示了Map1类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: iterator

import com.hp.hpl.jena.util.iterator.Map1; //导入依赖的package包/类
/**
 * An Iterator over the pairs of the Relation.
 * Each pair is returned as a java.util.Map.Entry.
 * The first element is accessed through <code>getKey()</code>,
 * the second through <code>getValue()</code>.
 *@see java.util.Map.Entry
 */   
public Iterator<PairEntry<T, T>> iterator()
{
    // Map<T, Set<T>> => Map.Entry<T, Set<T>> via "rows.entrySet()"
    // Map.Entry<T, Set<T>> => Iterator<PairEntry<T, T>>
    // Iterator<PairEntry<T, T>> ==> Iterator<PairEntry<T, T>> via IteratorIterator
    
    // Convert  Map.Entry<T, Set<T>> to Iterator<PairEntry<T, T>>
    // applied to an entrySet.
    
    Map1<Map.Entry<T, Set<T>>, Iterator<PairEntry<T, T>>> m1 = 
    new Map1<Map.Entry<T, Set<T>>, Iterator<PairEntry<T, T>>>(){
        public Iterator<PairEntry<T, T>> map1(Entry<T, Set<T>> entry)
        {
            return pairEntry(entry) ;
        }} ;
    
    Map1Iterator<Map.Entry<T, Set<T>>,Iterator<PairEntry<T, T>>> iter1 =
        new Map1Iterator<Map.Entry<T, Set<T>>,Iterator<PairEntry<T, T>>>(m1 , rows.entrySet().iterator()) ;
    // And now flatten it.
    Iterator<PairEntry<T, T>> iter2 = new IteratorIterator<PairEntry<T, T>>(iter1) ; 
    return iter2 ;
}
 
开发者ID:jacekkopecky,项目名称:parkjam,代码行数:30,代码来源:Relation.java


示例2: inner

import com.hp.hpl.jena.util.iterator.Map1; //导入依赖的package包/类
private static <X> Map1<X, PairEntry<X, X>> inner(final X a)
{
    return new Map1<X, PairEntry<X, X>>() {
        public PairEntry<X, X> map1(X b)
        {
            return new PairEntry<X, X>(a, b) ;
        }
    } ;
}
 
开发者ID:jacekkopecky,项目名称:parkjam,代码行数:10,代码来源:Relation.java


示例3: listDistinctMembers

import com.hp.hpl.jena.util.iterator.Map1; //导入依赖的package包/类
/**
 * <p>Answer an iterator over all of the individuals that are declared to be distinct by
 * this AllDifferent declaration. Each element of the iterator will be an {@link OntResource}.</p>
 * @return An iterator over distinct individuals.
 * @exception OntProfileException If the {@link Profile#DISTINCT_MEMBERS()} property is not supported in the current language profile.
 */
public ExtendedIterator<? extends OntResource> listDistinctMembers() {
    return getDistinctMembers().mapWith( new Map1<RDFNode,OntResource>() {
        public OntResource map1( RDFNode o ) {
            return ((Resource) o).as( OntResource.class );
        }} );
}
 
开发者ID:jacekkopecky,项目名称:parkjam,代码行数:13,代码来源:AllDifferentImpl.java


示例4: replaceSubjectMap

import com.hp.hpl.jena.util.iterator.Map1; //导入依赖的package包/类
private Map1<Statement, Statement> replaceSubjectMap( final Model inModel, final Resource newSubject )
{
Map1<Statement, Statement> replace = new Map1<Statement, Statement>() 
    {
    public Statement map1( Statement o )
        { 
        Statement s = o;
        return inModel.createStatement( newSubject, s.getPredicate(), s.getObject() );
        }
    };
return replace;
}
 
开发者ID:jacekkopecky,项目名称:parkjam,代码行数:13,代码来源:ModelAssembler.java


示例5: asResIterator

import com.hp.hpl.jena.util.iterator.Map1; //导入依赖的package包/类
/**
 * <p>Method that creates an iterator of resources</p>
 * @param i - an iterator of resources as input
 * @param m - the underlying model to use in the mapping
 * @return a ResIterator
 */
public static ResIterator asResIterator( Iterator<Resource> i, final ModelCom m ) 
{
	Map1<Resource, Resource> asResource = new Map1<Resource, Resource>() 
    { 
		public Resource map1( Resource o ) 
		{ return (Resource) m.asRDFNode( o.asNode() ); }
	};
    return new ResIteratorImpl( WrappedIterator.create( i ).mapWith( asResource ), null );
}
 
开发者ID:vaibhavkhadilkar,项目名称:D2RQ-Update,代码行数:16,代码来源:ExtendedIteratorFactory.java


示例6: asRDFNodeIterator

import com.hp.hpl.jena.util.iterator.Map1; //导入依赖的package包/类
/**
 * <p>Method that creates an iterator of rdf nodes</p>
 * @param i - an iterator of rdf nodes as input
 * @param m - the underlying model to use in the mapping
 * @return a NodeIterator
 */
static public NodeIterator asRDFNodeIterator( Iterator<RDFNode> i, final ModelCom m ) 
   {      
	Map1<RDFNode, RDFNode> asRDFNode = new Map1<RDFNode, RDFNode>() 
       { 
		public RDFNode map1( RDFNode o ) 
		{ return m.asRDFNode( o.asNode() ); }
	};
	return new NodeIteratorImpl( WrappedIterator.create( i ).mapWith( asRDFNode ), null );
   }
 
开发者ID:vaibhavkhadilkar,项目名称:D2RQ-Update,代码行数:16,代码来源:ExtendedIteratorFactory.java


示例7: mapWith

import com.hp.hpl.jena.util.iterator.Map1; //导入依赖的package包/类
@Override
public <U> ExtendedIterator<U> mapWith(Map1<Triple, U> map1) {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:semr,项目名称:neo4jena,代码行数:6,代码来源:ExecutionResultIterator.java


示例8: transferContentProperties

import com.hp.hpl.jena.util.iterator.Map1; //导入依赖的package包/类
private void transferContentProperties( Model partial, Resource someInitial, Resource combined )
{
Map1<Statement, Statement> replace = replaceSubjectMap( partial, combined );
for (Iterator<Property> it = ContentAssembler.contentProperties.iterator(); it.hasNext();)
    partial.add( copyProperties( someInitial, replace, it.next() ) );
}
 
开发者ID:jacekkopecky,项目名称:parkjam,代码行数:7,代码来源:ModelAssembler.java


示例9: copyProperties

import com.hp.hpl.jena.util.iterator.Map1; //导入依赖的package包/类
private List<Statement> copyProperties( Resource root, Map1<Statement, Statement> replace, Property property )
{ return root.listProperties( property  ).mapWith( replace ).toList(); }
 
开发者ID:jacekkopecky,项目名称:parkjam,代码行数:3,代码来源:ModelAssembler.java



注:本文中的com.hp.hpl.jena.util.iterator.Map1类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XMLSchemaLoader类代码示例发布时间:2022-05-22
下一篇:
Java CheckContext类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap