Class NodeId


  • public final class NodeId
    extends java.lang.Object
    ID of a node in the graph. An ID is given by a Key and a node type, which is used to distinguish instances and implementation classes for the same key. For example bind(Integer.class).toInstance(42) produces two nodes: an interface node with the key of Key<Integer> and an instance node with the same Key and value of 42.
    Since:
    4.0
    • Method Detail

      • newTypeId

        public static NodeId newTypeId​(Key<?> key)
      • newInstanceId

        public static NodeId newInstanceId​(Key<?> key)
      • getKey

        public Key<?> getKey()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object