Class Toxic

    • Field Detail

      • path

        private java.lang.String path
      • name

        private java.lang.String name
      • toxicity

        private float toxicity
    • Constructor Detail

      • Toxic

        public Toxic​(HttpClient httpClient,
                     java.lang.String toxicListPath,
                     java.lang.String name,
                     ToxicDirection stream)
      • Toxic

        public Toxic​(HttpClient httpClient,
                     java.lang.String path,
                     com.google.gson.JsonObject json)
    • Method Detail

      • setAttributes

        protected abstract void setAttributes​(com.google.gson.JsonObject attributes)
      • getAttributes

        protected abstract com.google.gson.JsonObject getAttributes()
      • getType

        protected abstract ToxicType getType()
      • createToxic

        protected void createToxic​(java.lang.String toxicListPath)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • postAttribute

        protected void postAttribute​(java.lang.String name,
                                     long value)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • setFromJson

        private void setFromJson​(com.google.gson.JsonObject json)
      • setToxicity

        public void setToxicity​(float toxicity)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • getName

        public java.lang.String getName()
      • getToxicity

        public float getToxicity()
      • remove

        public void remove()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

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