Class AbstractContentBuilder<D,C extends Content<D>>
- java.lang.Object
-
- io.annot8.implementations.support.content.AbstractContentBuilder<D,C>
-
- All Implemented Interfaces:
Content.Builder<C,D>,WithFromBuilder<Content.Builder<C,D>,C>,WithIdBuilder<Content.Builder<C,D>>,WithPropertiesBuilder<Content.Builder<C,D>>,WithSave<C>
public abstract class AbstractContentBuilder<D,C extends Content<D>> extends Object implements Content.Builder<C,D>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractContentBuilder(Item item)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Ccreate(String id, String description, ImmutableProperties properties, Supplier<D> data)Content.Builder<C,D>from(C from)protected ItemgetItem()Csave()Content.Builder<C,D>withData(Supplier<D> data)Content.Builder<C,D>withDescription(String description)Content.Builder<C,D>withId(String id)Content.Builder<C,D>withoutProperty(String key)Content.Builder<C,D>withoutProperty(String key, Object value)Content.Builder<C,D>withProperties(Properties properties)Content.Builder<C,D>withProperty(String key, Object value)Content.Builder<C,D>withPropertyIfPresent(String key, Optional<?> value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.annot8.api.data.Content.Builder
withData
-
-
-
-
Constructor Detail
-
AbstractContentBuilder
protected AbstractContentBuilder(Item item)
-
-
Method Detail
-
getItem
protected Item getItem()
-
withId
public Content.Builder<C,D> withId(String id)
- Specified by:
withIdin interfaceWithIdBuilder<D>
-
withDescription
public Content.Builder<C,D> withDescription(String description)
- Specified by:
withDescriptionin interfaceContent.Builder<D,C extends Content<D>>
-
withData
public Content.Builder<C,D> withData(Supplier<D> data)
-
from
public Content.Builder<C,D> from(C from)
-
withProperty
public Content.Builder<C,D> withProperty(String key, Object value)
- Specified by:
withPropertyin interfaceWithPropertiesBuilder<D>
-
withPropertyIfPresent
public Content.Builder<C,D> withPropertyIfPresent(String key, Optional<?> value)
- Specified by:
withPropertyIfPresentin interfaceWithPropertiesBuilder<D>
-
withProperties
public Content.Builder<C,D> withProperties(Properties properties)
- Specified by:
withPropertiesin interfaceWithPropertiesBuilder<D>
-
withoutProperty
public Content.Builder<C,D> withoutProperty(String key, Object value)
- Specified by:
withoutPropertyin interfaceWithPropertiesBuilder<D>
-
withoutProperty
public Content.Builder<C,D> withoutProperty(String key)
- Specified by:
withoutPropertyin interfaceWithPropertiesBuilder<D>
-
save
public C save() throws IncompleteException
- Specified by:
savein interfaceWithSave<D>- Throws:
IncompleteException
-
-