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()
Constructs a new instance for subclasses.
|
| 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)
Constructs a new byte array origin for a byte array.
|
protected static AbstractOrigin.CharSequenceOrigin |
newCharSequenceOrigin(CharSequence origin)
Constructs a new CharSequence origin for a CharSequence.
|
protected static AbstractOrigin.FileOrigin |
newFileOrigin(File origin)
Constructs a new file origin for a file.
|
protected static AbstractOrigin.FileOrigin |
newFileOrigin(String origin)
Constructs a new file origin for a file path.
|
protected static AbstractOrigin.InputStreamOrigin |
newInputStreamOrigin(InputStream origin)
Constructs a new input stream origin for a file.
|
protected static AbstractOrigin.OutputStreamOrigin |
newOutputStreamOrigin(OutputStream origin)
Constructs a new output stream origin for a file.
|
protected static AbstractOrigin.PathOrigin |
newPathOrigin(Path origin)
Constructs a new path origin for a file.
|
protected static AbstractOrigin.PathOrigin |
newPathOrigin(String origin)
Constructs a new path name origin for a path name.
|
protected static AbstractOrigin.IORandomAccessFileOrigin |
newRandomAccessFileOrigin(IORandomAccessFile origin)
Constructs a new RandomAccessFile origin for a RandomAccessFile.
|
protected static AbstractOrigin.RandomAccessFileOrigin |
newRandomAccessFileOrigin(RandomAccessFile origin)
Constructs a new RandomAccessFile origin for a RandomAccessFile.
|
protected static AbstractOrigin.ReaderOrigin |
newReaderOrigin(Reader origin)
Constructs a new reader origin for a reader.
|
protected static AbstractOrigin.URIOrigin |
newURIOrigin(URI origin)
Constructs a new reader origin for a URI.
|
protected static AbstractOrigin.WriterOrigin |
newWriterOrigin(Writer origin)
Constructs 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 |
setRandomAccessFile(IORandomAccessFile origin)
Sets a new origin.
|
B |
setRandomAccessFile(RandomAccessFile 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.
|
asThisclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasSupplier, get, getUncheckedpublic AbstractOriginSupplier()
protected AbstractOrigin<?,?> checkOrigin()
IllegalStateException - if the origin is null.protected AbstractOrigin<?,?> getOrigin()
protected boolean hasOrigin()
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.IORandomAccessFileOrigin newRandomAccessFileOrigin(IORandomAccessFile origin)
origin - the reader.protected static AbstractOrigin.RandomAccessFileOrigin newRandomAccessFileOrigin(RandomAccessFile origin)
origin - the reader.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.public B setByteArray(byte[] origin)
origin - the new origin.this instance.public B setCharSequence(CharSequence origin)
origin - the new origin.this instance.public B setFile(File origin)
origin - the new origin.this instance.public B setFile(String origin)
origin - the new origin.this instance.public B setInputStream(InputStream origin)
origin - the new origin.this instance.protected B setOrigin(AbstractOrigin<?,?> origin)
origin - the new origin.this instance.public B setOutputStream(OutputStream origin)
origin - the new origin.this instance.public B setPath(Path origin)
origin - the new origin.this instance.public B setPath(String origin)
origin - the new origin.this instance.public B setRandomAccessFile(IORandomAccessFile origin)
origin - the new origin.this instance.public B setRandomAccessFile(RandomAccessFile origin)
origin - the new origin.this instance.public B setReader(Reader origin)
origin - the new origin.this instance.public B setURI(URI origin)
origin - the new origin.this instance.