Class OrderingSetSerializer

java.lang.Object
org.openhab.core.config.core.OrderingSetSerializer
All Implemented Interfaces:
com.google.gson.JsonSerializer<Set<@Nullable Object>>

@NonNullByDefault public class OrderingSetSerializer extends Object implements com.google.gson.JsonSerializer<Set<@Nullable Object>>
Serializes set by ordering the elements
Author:
Sami Salonen - Initial contribution
  • Constructor Details

    • OrderingSetSerializer

      public OrderingSetSerializer()
  • Method Details

    • allSameClassAndComparable

      public static boolean allSameClassAndComparable(Set<@Nullable Object> src)
    • serialize

      public com.google.gson.JsonElement serialize(Set<@Nullable Object> src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Set<@Nullable Object>>