T
- the type of instances to build.B
- the type of builder subclass.public abstract class AbstractOriginSupplier<T,B extends AbstractOriginSupplier<T,B>> extends AbstractSupplier<T,B>
T
.Constructor and Description |
---|
AbstractOriginSupplier() |
Modifier and Type | Method and Description |
---|---|
protected AbstractOrigin<?,?> |
checkOrigin()
Checks whether the origin is null.
|
protected AbstractOrigin<?,?> |
getOrigin()
Gets the origin.
|
protected boolean |
hasOrigin()
Tests whether the origin is null.
|
protected static AbstractOrigin.ByteArrayOrigin |
newByteArrayOrigin(byte[] origin)
Creates a new byte array origin for a byte array.
|
protected static AbstractOrigin.CharSequenceOrigin |
newCharSequenceOrigin(CharSequence origin)
Creates a new CharSequence origin for a CharSequence.
|
protected static AbstractOrigin.FileOrigin |
newFileOrigin(File origin)
Creates a new file origin for a file.
|
protected static AbstractOrigin.FileOrigin |
newFileOrigin(String origin)
Creates a new file origin for a file path.
|
protected static AbstractOrigin.InputStreamOrigin |
newInputStreamOrigin(InputStream origin)
Creates a new input stream origin for a file.
|
protected static AbstractOrigin.OutputStreamOrigin |
newOutputStreamOrigin(OutputStream origin)
Creates a new output stream origin for a file.
|
protected static AbstractOrigin.PathOrigin |
newPathOrigin(Path origin)
Creates a new path origin for a file.
|
protected static AbstractOrigin.PathOrigin |
newPathOrigin(String origin)
Creates a new path name origin for a path name.
|
protected static AbstractOrigin.ReaderOrigin |
newReaderOrigin(Reader origin)
Creates a new reader origin for a reader.
|
protected static AbstractOrigin.URIOrigin |
newURIOrigin(URI origin)
Creates a new reader origin for a URI.
|
protected static AbstractOrigin.WriterOrigin |
newWriterOrigin(Writer origin)
Creates a new writer origin for a file.
|
B |
setByteArray(byte[] origin)
Sets a new origin.
|
B |
setCharSequence(CharSequence origin)
Sets a new origin.
|
B |
setFile(File origin)
Sets a new origin.
|
B |
setFile(String origin)
Sets a new origin.
|
B |
setInputStream(InputStream origin)
Sets a new origin.
|
protected B |
setOrigin(AbstractOrigin<?,?> origin)
Sets a new origin.
|
B |
setOutputStream(OutputStream origin)
Sets a new origin.
|
B |
setPath(Path origin)
Sets a new origin.
|
B |
setPath(String origin)
Sets a new origin.
|
B |
setReader(Reader origin)
Sets a new origin.
|
B |
setURI(URI origin)
Sets a new origin.
|
B |
setWriter(Writer origin)
Sets a new origin.
|
asThis
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asSupplier, get
public AbstractOriginSupplier()
protected static AbstractOrigin.ByteArrayOrigin newByteArrayOrigin(byte[] origin)
origin
- the byte array.protected static AbstractOrigin.CharSequenceOrigin newCharSequenceOrigin(CharSequence origin)
origin
- the CharSequence.protected static AbstractOrigin.FileOrigin newFileOrigin(File origin)
origin
- the file.protected static AbstractOrigin.FileOrigin newFileOrigin(String origin)
origin
- the file path.protected static AbstractOrigin.InputStreamOrigin newInputStreamOrigin(InputStream origin)
origin
- the input stream.protected static AbstractOrigin.OutputStreamOrigin newOutputStreamOrigin(OutputStream origin)
origin
- the output stream.protected static AbstractOrigin.PathOrigin newPathOrigin(Path origin)
origin
- the path.protected static AbstractOrigin.PathOrigin newPathOrigin(String origin)
origin
- the path name.protected static AbstractOrigin.ReaderOrigin newReaderOrigin(Reader origin)
origin
- the reader.protected static AbstractOrigin.URIOrigin newURIOrigin(URI origin)
origin
- the URI.protected static AbstractOrigin.WriterOrigin newWriterOrigin(Writer origin)
origin
- the writer.protected AbstractOrigin<?,?> checkOrigin()
IllegalStateException
- if the origin
is null
.protected AbstractOrigin<?,?> getOrigin()
protected boolean hasOrigin()
public B setByteArray(byte[] origin)
origin
- the new origin.public B setCharSequence(CharSequence origin)
origin
- the new origin.public B setFile(File origin)
origin
- the new origin.public B setFile(String origin)
origin
- the new origin.public B setInputStream(InputStream origin)
origin
- the new origin.protected B setOrigin(AbstractOrigin<?,?> origin)
origin
- the new origin.public B setOutputStream(OutputStream origin)
origin
- the new origin.public B setPath(Path origin)
origin
- the new origin.public B setPath(String origin)
origin
- the new origin.public B setReader(Reader origin)
origin
- the new origin.public B setURI(URI origin)
origin
- the new origin.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.