本文整理匯總了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);
}