com.h3c.util.codec

## Interface Encodable

- All Known Implementing Classes:
    ClassNameCodec, DomainHealth, EntropicStringSetCodec, Health, LocationHealth, StringSetCodec, VsnHealth

      public interface Encodable

  A class that implements `Encodable` is declaring that its internal state can be encoded as a String.

  The general contract for an object implementing this interface is to:

  1. implement the instance method `toEncodedString` to create a string that embodies the state of the instance
  2. implement a static method `valueOf(String)` which will return an instance re-constituted from the given encoded string
  The `valueOf()` method should throw `NullPointerException` and `IllegalArgumentException` as appropriate.

  For `SomeEncodable` that implements `Encodable` the following should hold true:

       SomeEncodable some = new SomeEncodable(...);
       String blueprint = some.toEncodedString();
       SomeEncodable copy = SomeEncodable.valueOf(blueprint);
       assert copy.equals(some);

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `toEncodedString()` Returns a string that is an encodement of this instance.

- - ### Method Detail

    - #### toEncodedString

          String toEncodedString()

      Returns a string that is an encodement of this instance.
      Returns:
        a string encodement of this instance

Copyright © 2014. All Rights Reserved.