org.eclipse.rdf4j.query.Binding类的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(198)

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

Binding介绍

[英]A named value binding.
[中]命名值绑定。

代码示例

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

@Override
public final int hashCode() {
  int hashCode = 0;
  for (Binding binding : this) {
    hashCode ^= binding.getName().hashCode() ^ binding.getValue().hashCode();
  }
  return hashCode;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-query

public Value getValue(String bindingName) {
  Binding binding = getBinding(bindingName);
  if (binding != null) {
    return binding.getValue();
  }
  return null;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-query

/**
 * Adds a binding to the binding set.
 * 
 * @param binding
 *        The binding to add to the binding set.
 */
public void addBinding(Binding binding) {
  bindings.put(binding.getName(), binding);
}

代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog

/*******************************************************************************************************************
 *
 ******************************************************************************************************************/
@Nonnull
protected static Optional<Long> toLong (final @Nullable Binding binding)
 {
  return Optional.ofNullable(binding).map(b -> b.getValue()).map(v -> Long.parseLong(v.stringValue()));
 }

代码示例来源:origin: eclipse/rdf4j

/**
 * Adds a binding to the binding set.
 * 
 * @param binding
 *        The binding to add to the binding set.
 */
public void addBinding(Binding binding) {
  bindings.put(binding.getName(), binding);
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-query

@Override
public boolean equals(Object o) {
  if (o instanceof Binding) {
    Binding other = (Binding)o;
    return name.equals(other.getName()) && value.equals(other.getValue());
  }
  return false;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

public Value getValue(String bindingName) {
  Binding binding = getBinding(bindingName);
  if (binding != null) {
    return binding.getValue();
  }
  return null;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

/**
 * Adds a binding to the binding set.
 * 
 * @param binding
 *        The binding to add to the binding set.
 */
public void addBinding(Binding binding) {
  bindings.put(binding.getName(), binding);
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-query

@Override
public final int hashCode() {
  int hashCode = 0;
  for (Binding binding : this) {
    hashCode ^= binding.getName().hashCode() ^ binding.getValue().hashCode();
  }
  return hashCode;
}

代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog

/*******************************************************************************************************************
 *
 ******************************************************************************************************************/
@Nonnull
protected static Optional<String> toString (final @Nullable Binding binding)
 {
  return Optional.ofNullable(binding).map(b -> b.getValue()).map(v -> v.stringValue());
 }

代码示例来源:origin: eclipse/rdf4j

@Override
public final int hashCode() {
  int hashCode = 0;
  for (Binding binding : this) {
    hashCode ^= binding.getName().hashCode() ^ binding.getValue().hashCode();
  }
  return hashCode;
}

代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog

/*******************************************************************************************************************
 *
 ******************************************************************************************************************/
@Nonnull
protected static Optional<Integer> toInteger (final @Nullable Binding binding)
 {
  return Optional.ofNullable(binding).map(b -> b.getValue()).map(v -> Integer.parseInt(v.stringValue()));
 }

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

@Override
public boolean equals(Object o) {
  if (o instanceof Binding) {
    Binding other = (Binding)o;
    return name.equals(other.getName()) && value.equals(other.getValue());
  }
  return false;
}

代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog

/*******************************************************************************************************************
 *
 ******************************************************************************************************************/
@Nonnull
protected static Optional<Duration> toDuration (final @Nullable Binding binding)
 {
  return Optional.ofNullable(binding).map(b -> b.getValue()).map(v -> Duration.ofMillis((int)Float.parseFloat(v.stringValue())));
 }

代码示例来源:origin: eclipse/rdf4j

@Override
public boolean equals(Object o) {
  if (o instanceof Binding) {
    Binding other = (Binding)o;
    return name.equals(other.getName()) && value.equals(other.getValue());
  }
  return false;
}

代码示例来源:origin: eclipse/rdf4j

@Override
public Value getValue(String bindingName) {
  Binding binding = getBinding(bindingName);
  if (binding != null) {
    return binding.getValue();
  }
  return null;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

/**
 * Adds a new binding to the binding set. The binding's name must not already be part of this binding set.
 * 
 * @param binding
 *        The binding to add this this BindingSet.
 */
public void addBinding(Binding binding) {
  addBinding(binding.getName(), binding.getValue());
}

代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog

/*******************************************************************************************************************
 *
 ******************************************************************************************************************/
@Nonnull
protected static Optional<Id> toId (final @Nullable Binding binding)
 {
  return Optional.ofNullable(binding).map(b -> b.getValue()).map(v -> v.stringValue()).map(s -> new Id(s));
 }

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryalgebra-evaluation

/**
 * Adds a new binding to the binding set. The binding's name must not already be part of this binding set.
 * 
 * @param binding
 *        The binding to add this this BindingSet.
 */
public void addBinding(Binding binding) {
  addBinding(binding.getName(), binding.getValue());
}

代码示例来源:origin: apache/incubator-rya

@Override
  public String toString() {
    final StringBuilder sb = new StringBuilder();
    sb.append("  names: ");
    for (final String name : getBindingNames()) {
      sb.append("\n    [name]: " + name + "  ---  [value]: " + getBinding(name).getValue().toString());
    }
    return sb.toString();
  }
}

相关文章