Class BytesId

  • All Implemented Interfaces:
    java.lang.Comparable<org.apache.hugegraph.computer.core.graph.value.Value>, org.apache.hugegraph.computer.core.graph.id.Id, org.apache.hugegraph.computer.core.graph.value.Value, org.apache.hugegraph.computer.core.graph.value.Value.Tvalue<java.lang.Object>, org.apache.hugegraph.computer.core.io.Readable, org.apache.hugegraph.computer.core.io.Writable

    public class BytesId
    extends java.lang.Object
    implements org.apache.hugegraph.computer.core.graph.id.Id
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.hugegraph.computer.core.graph.value.Value

        org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue<T extends java.lang.Object>, org.apache.hugegraph.computer.core.graph.value.Value.Tvalue<T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static BytesId EMPTY  
    • Constructor Summary

      Constructors 
      Constructor Description
      BytesId()  
      BytesId​(org.apache.hugegraph.computer.core.graph.id.IdType idType, byte[] bytes)  
      BytesId​(org.apache.hugegraph.computer.core.graph.id.IdType idType, byte[] bytes, long length)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object asObject()  
      void assign​(org.apache.hugegraph.computer.core.graph.value.Value other)  
      int compareTo​(org.apache.hugegraph.computer.core.graph.value.Value obj)  
      org.apache.hugegraph.computer.core.graph.id.Id copy()  
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      org.apache.hugegraph.computer.core.graph.id.IdType idType()  
      int length()  
      static BytesId of​(long value)  
      static BytesId of​(java.lang.String value)  
      static BytesId of​(java.util.UUID value)  
      void read​(org.apache.hugegraph.computer.core.io.RandomAccessInput in)  
      java.lang.String toString()  
      java.lang.Object value()  
      org.apache.hugegraph.computer.core.graph.value.ValueType valueType()  
      void write​(org.apache.hugegraph.computer.core.io.RandomAccessOutput out)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.hugegraph.computer.core.graph.value.Value

        checkAssign, isNumber, string
    • Field Detail

      • EMPTY

        public static final BytesId EMPTY
    • Constructor Detail

      • BytesId

        public BytesId()
      • BytesId

        public BytesId​(org.apache.hugegraph.computer.core.graph.id.IdType idType,
                       byte[] bytes)
      • BytesId

        public BytesId​(org.apache.hugegraph.computer.core.graph.id.IdType idType,
                       byte[] bytes,
                       long length)
    • Method Detail

      • of

        public static BytesId of​(long value)
      • of

        public static BytesId of​(java.lang.String value)
      • of

        public static BytesId of​(java.util.UUID value)
      • valueType

        public org.apache.hugegraph.computer.core.graph.value.ValueType valueType()
        Specified by:
        valueType in interface org.apache.hugegraph.computer.core.graph.value.Value
      • idType

        public org.apache.hugegraph.computer.core.graph.id.IdType idType()
        Specified by:
        idType in interface org.apache.hugegraph.computer.core.graph.id.Id
      • assign

        public void assign​(org.apache.hugegraph.computer.core.graph.value.Value other)
        Specified by:
        assign in interface org.apache.hugegraph.computer.core.graph.value.Value
      • copy

        public org.apache.hugegraph.computer.core.graph.id.Id copy()
        Specified by:
        copy in interface org.apache.hugegraph.computer.core.graph.value.Value
      • length

        public int length()
        Specified by:
        length in interface org.apache.hugegraph.computer.core.graph.id.Id
      • value

        public java.lang.Object value()
        Specified by:
        value in interface org.apache.hugegraph.computer.core.graph.value.Value
        Specified by:
        value in interface org.apache.hugegraph.computer.core.graph.value.Value.Tvalue<java.lang.Object>
      • asObject

        public java.lang.Object asObject()
        Specified by:
        asObject in interface org.apache.hugegraph.computer.core.graph.id.Id
      • read

        public void read​(org.apache.hugegraph.computer.core.io.RandomAccessInput in)
                  throws java.io.IOException
        Specified by:
        read in interface org.apache.hugegraph.computer.core.io.Readable
        Throws:
        java.io.IOException
      • write

        public void write​(org.apache.hugegraph.computer.core.io.RandomAccessOutput out)
                   throws java.io.IOException
        Specified by:
        write in interface org.apache.hugegraph.computer.core.io.Writable
        Throws:
        java.io.IOException
      • compareTo

        public int compareTo​(org.apache.hugegraph.computer.core.graph.value.Value obj)
        Specified by:
        compareTo in interface java.lang.Comparable<org.apache.hugegraph.computer.core.graph.value.Value>
      • equals

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

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

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