Class Content

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  Content.Type  
    • Constructor Summary

      Constructors 
      Constructor Description
      Content()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String getId()
      Unique id for this object.
      abstract Content.Type getType()
      Returns the Content.Type value for this content object.
      <T> java.util.Optional<T> unwrap​(java.lang.Class<T> clazz)
      Unwrap object if possible, otherwise throw.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Content

        public Content()
    • Method Detail

      • getId

        @Nullable
        public abstract java.lang.String getId()
        Unique id for this object.

        This id is unique for the entire lifetime of this Content object and persists across renames. Two content objects with the same key will have different id.

      • getType

        @Redacted
        public abstract Content.Type getType()
        Returns the Content.Type value for this content object.

        The name of the returned value should match the JSON type name used for serializing the content object.

      • unwrap

        public <T> java.util.Optional<T> unwrap​(java.lang.Class<T> clazz)
        Unwrap object if possible, otherwise throw.
        Type Parameters:
        T - Type to wrap to.
        Parameters:
        clazz - Class we're trying to return.
        Returns:
        The return value