congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
BaseGraph.predecessors
Code IndexAdd Tabnine to your IDE (free)

How to use
predecessors
method
in
com.google.common.graph.BaseGraph

Best Java code snippets using com.google.common.graph.BaseGraph.predecessors (Showing top 15 results out of 315)

origin: google/guava

@Override
public Set<N> predecessors(N node) {
 return delegate().predecessors(node);
}
origin: google/j2objc

@Override
public Set<N> predecessors(N node) {
 return delegate().predecessors(node);
}
origin: google/guava

@Override
public UnmodifiableIterator<EndpointPair<N>> iterator() {
 return Iterators.unmodifiableIterator(
   Iterators.concat(
     Iterators.transform(
       graph.predecessors(node).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N predecessor) {
         return EndpointPair.ordered(predecessor, node);
        }
       }),
     Iterators.transform(
       // filter out 'node' from successors (already covered by predecessors, above)
       Sets.difference(graph.successors(node), ImmutableSet.of(node)).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N successor) {
         return EndpointPair.ordered(node, successor);
        }
       })));
}
origin: wildfly/wildfly

@Override
public Set<N> predecessors(N node) {
 return delegate().predecessors(node);
}
origin: google/guava

 @Override
 public boolean contains(@Nullable Object obj) {
  if (!(obj instanceof EndpointPair)) {
   return false;
  }
  EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
  if (!endpointPair.isOrdered()) {
   return false;
  }
  Object source = endpointPair.source();
  Object target = endpointPair.target();
  return (node.equals(source) && graph.successors(node).contains(target))
    || (node.equals(target) && graph.predecessors(node).contains(source));
 }
}
origin: google/j2objc

@Override
public UnmodifiableIterator<EndpointPair<N>> iterator() {
 return Iterators.unmodifiableIterator(
   Iterators.concat(
     Iterators.transform(
       graph.predecessors(node).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N predecessor) {
         return EndpointPair.ordered(predecessor, node);
        }
       }),
     Iterators.transform(
       // filter out 'node' from successors (already covered by predecessors, above)
       Sets.difference(graph.successors(node), ImmutableSet.of(node)).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N successor) {
         return EndpointPair.ordered(node, successor);
        }
       })));
}
origin: google/j2objc

 @Override
 public boolean contains(@NullableDecl Object obj) {
  if (!(obj instanceof EndpointPair)) {
   return false;
  }
  EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
  if (!endpointPair.isOrdered()) {
   return false;
  }
  Object source = endpointPair.source();
  Object target = endpointPair.target();
  return (node.equals(source) && graph.successors(node).contains(target))
    || (node.equals(target) && graph.predecessors(node).contains(source));
 }
}
origin: wildfly/wildfly

@Override
public UnmodifiableIterator<EndpointPair<N>> iterator() {
 return Iterators.unmodifiableIterator(
   Iterators.concat(
     Iterators.transform(
       graph.predecessors(node).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N predecessor) {
         return EndpointPair.ordered(predecessor, node);
        }
       }),
     Iterators.transform(
       // filter out 'node' from successors (already covered by predecessors, above)
       Sets.difference(graph.successors(node), ImmutableSet.of(node)).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N successor) {
         return EndpointPair.ordered(node, successor);
        }
       })));
}
origin: wildfly/wildfly

 @Override
 public boolean contains(@NullableDecl Object obj) {
  if (!(obj instanceof EndpointPair)) {
   return false;
  }
  EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
  if (!endpointPair.isOrdered()) {
   return false;
  }
  Object source = endpointPair.source();
  Object target = endpointPair.target();
  return (node.equals(source) && graph.successors(node).contains(target))
    || (node.equals(target) && graph.predecessors(node).contains(source));
 }
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public Set<N> predecessors(N node) {
 return delegate().predecessors(node);
}
origin: org.jboss.eap/wildfly-client-all

@Override
public Set<N> predecessors(N node) {
 return delegate().predecessors(node);
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public UnmodifiableIterator<EndpointPair<N>> iterator() {
 return Iterators.unmodifiableIterator(
   Iterators.concat(
     Iterators.transform(
       graph.predecessors(node).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N predecessor) {
         return EndpointPair.ordered(predecessor, node);
        }
       }),
     Iterators.transform(
       // filter out 'node' from successors (already covered by predecessors, above)
       Sets.difference(graph.successors(node), ImmutableSet.of(node)).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N successor) {
         return EndpointPair.ordered(node, successor);
        }
       })));
}
origin: org.jboss.eap/wildfly-client-all

@Override
public UnmodifiableIterator<EndpointPair<N>> iterator() {
 return Iterators.unmodifiableIterator(
   Iterators.concat(
     Iterators.transform(
       graph.predecessors(node).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N predecessor) {
         return EndpointPair.ordered(predecessor, node);
        }
       }),
     Iterators.transform(
       // filter out 'node' from successors (already covered by predecessors, above)
       Sets.difference(graph.successors(node), ImmutableSet.of(node)).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N successor) {
         return EndpointPair.ordered(node, successor);
        }
       })));
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

 @Override
 public boolean contains(@Nullable Object obj) {
  if (!(obj instanceof EndpointPair)) {
   return false;
  }
  EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
  if (!endpointPair.isOrdered()) {
   return false;
  }
  Object source = endpointPair.source();
  Object target = endpointPair.target();
  return (node.equals(source) && graph.successors(node).contains(target))
    || (node.equals(target) && graph.predecessors(node).contains(source));
 }
}
origin: org.jboss.eap/wildfly-client-all

 @Override
 public boolean contains(@NullableDecl Object obj) {
  if (!(obj instanceof EndpointPair)) {
   return false;
  }
  EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
  if (!endpointPair.isOrdered()) {
   return false;
  }
  Object source = endpointPair.source();
  Object target = endpointPair.target();
  return (node.equals(source) && graph.successors(node).contains(target))
    || (node.equals(target) && graph.predecessors(node).contains(source));
 }
}
com.google.common.graphBaseGraphpredecessors

Popular methods of BaseGraph

  • adjacentNodes
    Returns the nodes which have an incident edge in common with node in this graph.
  • allowsSelfLoops
    Returns true if this graph allows self-loops (edges that connect a node to itself). Attempting to ad
  • degree
    Returns the count of node's incident edges, counting self-loops twice (equivalently, the number of t
  • edges
    Returns all edges in this graph.
  • hasEdgeConnecting
    Returns true if there is an edge directly connecting nodeU to nodeV. This is equivalent to nodes().c
  • inDegree
    Returns the count of node's incoming edges (equal to predecessors(node).size()) in a directed graph.
  • isDirected
    Returns true if the edges in this graph are directed. Directed edges connect a EndpointPair#source()
  • nodeOrder
    Returns the order of iteration for the elements of #nodes().
  • nodes
    Returns all nodes in this graph, in the order specified by #nodeOrder().
  • outDegree
    Returns the count of node's outgoing edges (equal to successors(node).size()) in a directed graph. I
  • successors
  • successors

Popular in Java

  • Finding current android device location
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now