Class ComputerGraph.ComputerElement

    • Constructor Detail

      • ComputerElement

        public ComputerElement​(Element element)
    • Method Detail

      • id

        public Object id()
        Description copied from interface: Element
        Gets the unique identifier for the graph Element.
        Specified by:
        id in interface Element
        Returns:
        The id of the element
      • label

        public String label()
        Description copied from interface: Element
        Gets the label for the graph Element which helps categorize it.
        Specified by:
        label in interface Element
        Returns:
        The label of the element
      • graph

        public Graph graph()
        Description copied from interface: Element
        Get the graph that this element is within.
        Specified by:
        graph in interface Element
        Returns:
        the graph of this element
      • keys

        public Set<String> keys()
        Description copied from interface: Element
        Get the keys of the properties associated with this element. The default implementation iterators the properties and stores the keys into a HashSet.
        Specified by:
        keys in interface Element
        Returns:
        The property key set
      • property

        public <V> Property<V> property​(String key,
                                        V value)
        Description copied from interface: Element
        Add or set a property value for the Element given its key.
        Specified by:
        property in interface Element
      • remove

        public void remove()
        Description copied from interface: Element
        Removes the Element from the graph.
        Specified by:
        remove in interface Element
      • properties

        public <V> Iterator<? extends Property<V>> properties​(String... propertyKeys)
        Description copied from interface: Element
        Get an Iterator of properties where the propertyKeys is meant to be a filter on the available keys. If no keys are provide then return all the properties.
        Specified by:
        properties in interface Element
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object