jadex.commons.Tuple.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(9.9k)|赞(0)|评价(0)|浏览(76)

本文整理了Java中jadex.commons.Tuple.<init>()方法的一些代码示例,展示了Tuple.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tuple.<init>()方法的具体详情如下:
包路径:jadex.commons.Tuple
类名称:Tuple
方法名:<init>

Tuple.<init>介绍

[英]Convenience constructor for binary tuples.
[中]方便的二进制元组构造函数。

代码示例

代码示例来源:origin: net.sourceforge.jadex/jadex-xml

public Object postProcess(IContext context, Object object)
{
  Map<String, Object>    map    = (Map<String, Object>) object;
  return new Tuple((Object[])map.get("entities"));
}

代码示例来源:origin: net.sourceforge.jadex/jadex-bridge

/**
 *  Get the cache key.
 *  Needs to identify this element with respect to its important features so that
 *  two equal elements should return the same key.
 */
public Object getCacheKey()
{
  return new Tuple(new Object[]{this.getClass().getName(), filter, 
    oneresult? Boolean.TRUE: Boolean.FALSE, remote? Boolean.TRUE: Boolean.FALSE});
}

代码示例来源:origin: net.sourceforge.jadex/jadex-bridge

/**
 *  Get the cache key.
 *  Needs to identify this element with respect to its important features so that
 *  two equal elements should return the same key.
 */
public Object getCacheKey()
{
  return new Tuple(new Object[]{this.getClass().getName(), filter, 
    oneresult? Boolean.TRUE: Boolean.FALSE, oneresult? Boolean.TRUE: Boolean.FALSE, type.getName()});
}

代码示例来源:origin: org.activecomponents.jadex/jadex-commons-gui

/**
 *  Insert a row at a position.
 *  @param rowcnt The row cnt.
 *  @param row The row data.
 *  @param object The object.
 */
public synchronized void insertRow(int rowcnt, List row, Object object)
{
  data.add(rowcnt, new Tuple(row, object));
   //System.out.println("DATA: "+data);
  fireTableRowsInserted(rowcnt, rowcnt);
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static GoalbaseFlyweight getGoalbaseFlyweight(IOAVState state, Object scope)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  GoalbaseFlyweight ret = (GoalbaseFlyweight)ip.getFlyweightCache(IGoalbase.class, new Tuple(IGoalbase.class, scope));
  if(ret==null)
  {
    ret = new GoalbaseFlyweight(state, scope);
    ip.putFlyweightCache(IGoalbase.class, new Tuple(IGoalbase.class, scope), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static EventbaseFlyweight getEventbaseFlyweight(IOAVState state, Object scope)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  EventbaseFlyweight ret = (EventbaseFlyweight)ip.getFlyweightCache(IEventbase.class, new Tuple(IEventbase.class, scope));
  if(ret==null)
  {
    ret = new EventbaseFlyweight(state, scope);
    ip.putFlyweightCache(IEventbase.class, new Tuple(IEventbase.class, scope), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static WaitAbstractionFlyweight getWaitAbstractionFlyweight(IOAVState state, Object scope, Object handle)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  WaitAbstractionFlyweight ret = (WaitAbstractionFlyweight)ip.getFlyweightCache(IWaitAbstraction.class, new Tuple(IWaitAbstraction.class, handle));
  if(ret==null)
  {
    ret = new WaitAbstractionFlyweight(state, scope, handle);
    ip.putFlyweightCache(IWaitAbstraction.class, new Tuple(IWaitAbstraction.class, handle), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static PlanbaseFlyweight getPlanbaseFlyweight(IOAVState state, Object scope)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  PlanbaseFlyweight ret = (PlanbaseFlyweight)ip.getFlyweightCache(IPlanbase.class, new Tuple(IPlanbase.class, scope));
  if(ret==null)
  {
    ret = new PlanbaseFlyweight(state, scope);
    ip.putFlyweightCache(IPlanbase.class, new Tuple(IPlanbase.class, scope), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static GoalFlyweight getGoalFlyweight(IOAVState state, Object scope, Object handle)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  GoalFlyweight ret = (GoalFlyweight)ip.getFlyweightCache(IGoal.class, new Tuple(IGoal.class, handle));
  if(ret==null)
  {
    ret = new GoalFlyweight(state, scope, handle);
    ip.putFlyweightCache(IGoal.class, new Tuple(IGoal.class, handle), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static InternalEventFlyweight getInternalEventFlyweight(IOAVState state, Object scope, Object handle)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  InternalEventFlyweight ret = (InternalEventFlyweight)ip.getFlyweightCache(IInternalEvent.class, new Tuple(IInternalEvent.class, handle));
  if(ret==null)
  {
    ret = new InternalEventFlyweight(state, scope, handle);
    ip.putFlyweightCache(IInternalEvent.class, new Tuple(IInternalEvent.class, handle), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static ExpressionbaseFlyweight getExpressionbaseFlyweight(IOAVState state, Object scope)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  ExpressionbaseFlyweight ret = (ExpressionbaseFlyweight)ip.getFlyweightCache(IExpressionbase.class, new Tuple(IExpressionbase.class, scope));
  if(ret==null)
  {
    ret = new ExpressionbaseFlyweight(state, scope);
    ip.putFlyweightCache(IExpressionbase.class, new Tuple(IExpressionbase.class, scope), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static BeliefbaseFlyweight getBeliefbaseFlyweight(IOAVState state, Object scope)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  BeliefbaseFlyweight ret = (BeliefbaseFlyweight)ip.getFlyweightCache(IBeliefbase.class, new Tuple(IBeliefbase.class, scope));
  if(ret==null)
  {
    ret = new BeliefbaseFlyweight(state, scope);
    ip.putFlyweightCache(IBeliefbase.class, new Tuple(IBeliefbase.class, scope), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static ParameterFlyweight getParameterFlyweight(IOAVState state, Object scope, Object handle, String name, Object parameterelement)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  ParameterFlyweight ret = (ParameterFlyweight)ip.getFlyweightCache(IParameter.class, new Tuple(IParameter.class, parameterelement, name));
  if(ret==null)
  {
    ret = new ParameterFlyweight(state, scope, handle, name, parameterelement);
    ip.putFlyweightCache(IParameter.class, new Tuple(IParameter.class, parameterelement, name), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static PlanFlyweight getPlanFlyweight(IOAVState state, Object scope, Object handle)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  PlanFlyweight ret = (PlanFlyweight)ip.getFlyweightCache(IPlan.class, new Tuple(IPlan.class, handle));
  if(ret==null)
  {
    ret = new PlanFlyweight(state, scope, handle);
    ip.putFlyweightCache(IPlan.class, new Tuple(IPlan.class, handle), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static BeliefSetFlyweight getBeliefSetFlyweight(IOAVState state, Object scope, Object handle)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  BeliefSetFlyweight ret = (BeliefSetFlyweight)ip.getFlyweightCache(IBeliefSet.class, new Tuple(IBeliefSet.class, handle));
  if(ret==null)
  {
    ret = new BeliefSetFlyweight(state, scope, handle);
    ip.putFlyweightCache(IBeliefSet.class, new Tuple(IBeliefSet.class, handle), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static ExpressionFlyweight getExpressionFlyweight(IOAVState state, Object scope, Object handle)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  ExpressionFlyweight ret = (ExpressionFlyweight)ip.getFlyweightCache(IExpression.class, new Tuple(IExpression.class, handle));
  if(ret==null)
  {
    ret = new ExpressionFlyweight(state, scope, handle);
    ip.putFlyweightCache(IExpression.class, new Tuple(IExpression.class, handle), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static BeliefFlyweight getBeliefFlyweight(IOAVState state, Object scope, Object handle)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  BeliefFlyweight ret = (BeliefFlyweight)ip.getFlyweightCache(IBelief.class, new Tuple(IBelief.class, handle));
  if(ret==null)
  {
    ret = new BeliefFlyweight(state, scope, handle);
    ip.putFlyweightCache(IBelief.class, new Tuple(IBelief.class, handle), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static MessageEventFlyweight getMessageEventFlyweight(IOAVState state, Object scope, Object handle)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  MessageEventFlyweight ret = (MessageEventFlyweight)ip.getFlyweightCache(IMessageEvent.class, new Tuple(IMessageEvent.class, handle));
  if(ret==null)
  {
    ret = new MessageEventFlyweight(state, scope, handle);
    ip.putFlyweightCache(IMessageEvent.class, new Tuple(IMessageEvent.class, handle), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static ParameterSetFlyweight getParameterSetFlyweight(IOAVState state, Object scope, Object handle, String name, Object parameterelement)
{
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  ParameterSetFlyweight ret = (ParameterSetFlyweight)ip.getFlyweightCache(IParameterSet.class, new Tuple(IParameterSet.class, parameterelement, name));
  if(ret==null)
  {
    ret = new ParameterSetFlyweight(state, scope, handle, name, parameterelement);
    ip.putFlyweightCache(IParameterSet.class, new Tuple(IParameterSet.class, parameterelement, name), ret);
  }
  return ret;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdi

/**
 *  Get or create a flyweight.
 *  @return The flyweight.
 */
public static WaitqueueFlyweight getWaitqueueFlyweight(IOAVState state, Object scope, Object rplan)
{
  Tuple    key    = new Tuple(rplan, IWaitqueue.class);
  BDIInterpreter ip = BDIInterpreter.getInterpreter(state);
  WaitqueueFlyweight ret = (WaitqueueFlyweight)ip.getFlyweightCache(IWaitqueue.class, key);
  if(ret==null)
  {
    ret = new WaitqueueFlyweight(state, scope, rplan);
    ip.putFlyweightCache(IWaitqueue.class, key, ret);
  }
  return ret;
}

相关文章

微信公众号

最新文章

更多