本文整理汇总了Java中net.sourceforge.plantuml.cucadiagram.Link.contains方法的典型用法代码示例。如果您正苦于以下问题:Java Link.contains方法的具体用法?Java Link.contains怎么用?Java Link.contains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sourceforge.plantuml.cucadiagram.Link
的用法示例。
在下文中一共展示了Link.contains方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onlyOneLink
import net.sourceforge.plantuml.cucadiagram.Link; //导入方法依赖的package包/类
private boolean onlyOneLink(IEntity ent) {
int nb = 0;
for (Link link : dotData.getLinks()) {
if (link.isInvis()) {
continue;
}
if (link.contains(ent)) {
nb++;
}
if (nb > 1) {
return false;
}
}
return nb == 1;
}
示例2: getLinksOfThisLeaf
import net.sourceforge.plantuml.cucadiagram.Link; //导入方法依赖的package包/类
private List<Link> getLinksOfThisLeaf(ILeaf leaf) {
final List<Link> result = new ArrayList<Link>();
for (Link link : links) {
if (link.contains(leaf)) {
result.add(link);
}
}
return result;
}
示例3: getNbOfHozizontalLollipop
import net.sourceforge.plantuml.cucadiagram.Link; //导入方法依赖的package包/类
public int getNbOfHozizontalLollipop(IEntity entity) {
if (entity.getEntityType() == LeafType.LOLLIPOP) {
throw new IllegalArgumentException();
}
int result = 0;
for (Link link : getLinks()) {
if (link.getLength() == 1 && link.contains(entity) && link.containsType(LeafType.LOLLIPOP)) {
result++;
}
}
return result;
}
示例4: getNotes
import net.sourceforge.plantuml.cucadiagram.Link; //导入方法依赖的package包/类
private Collection<IEntity> getNotes(IEntity ent) {
final List<IEntity> result = new ArrayList<IEntity>();
for (Link link : diagram.getLinks()) {
if (link.contains(ent) == false) {
continue;
}
if (link.getEntity1().getEntityType() == LeafType.NOTE
|| link.getEntity2().getEntityType() == LeafType.NOTE) {
result.add(link.getOther(ent));
}
}
return Collections.unmodifiableList(result);
}
示例5: getLinksButNotes
import net.sourceforge.plantuml.cucadiagram.Link; //导入方法依赖的package包/类
private Collection<Link> getLinksButNotes(IEntity ent) {
final List<Link> result = new ArrayList<Link>();
for (Link link : diagram.getLinks()) {
if (link.contains(ent) == false) {
continue;
}
if (link.getEntity1().getEntityType() == LeafType.NOTE
|| link.getEntity2().getEntityType() == LeafType.NOTE) {
continue;
}
result.add(link);
}
return Collections.unmodifiableList(result);
}