Package org.eolang.maven.objectionary
Class ObjsDefault
- java.lang.Object
-
- org.eolang.maven.objectionary.ObjsDefault
-
- All Implemented Interfaces:
Objectionaries
public final class ObjsDefault extends Object implements Objectionaries
Default objectionaries. The class is immutable, but NOT thread-safe.- Since:
- 0.29.6
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eolang.maven.objectionary.Objectionaries
Objectionaries.Fake
-
-
Constructor Summary
Constructors Constructor Description ObjsDefault(Map.Entry<CommitHash,Objectionary>... entries)
Constructor for tests with predefined Objectionaries.ObjsDefault(org.cactoos.Scalar<Path> cache, org.cactoos.Scalar<Boolean> remote)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(ObjectName name)
Check if an object exists.org.cactoos.Input
object(ObjectName name)
Get an object by hash and name.
-
-
-
Constructor Detail
-
ObjsDefault
public ObjsDefault(org.cactoos.Scalar<Path> cache, org.cactoos.Scalar<Boolean> remote)
Constructor.- Parameters:
cache
- Cache path.remote
- Use cache.
-
ObjsDefault
@SafeVarargs public ObjsDefault(Map.Entry<CommitHash,Objectionary>... entries)
Constructor for tests with predefined Objectionaries.- Parameters:
entries
- Predefined Objectionaries.
-
-
Method Detail
-
object
public org.cactoos.Input object(ObjectName name) throws IOException
Description copied from interface:Objectionaries
Get an object by hash and name.- Specified by:
object
in interfaceObjectionaries
- Parameters:
name
- Object name- Returns:
- Object
- Throws:
IOException
- If some I/O problem happens.
-
contains
public boolean contains(ObjectName name) throws IOException
Description copied from interface:Objectionaries
Check if an object exists.- Specified by:
contains
in interfaceObjectionaries
- Parameters:
name
- Object name- Returns:
- True if an object exists, false otherwise
- Throws:
IOException
- If some I/O problem happens.
-
-