Package org.eolang.maven.name
Class OnVersioned
- java.lang.Object
-
- org.eolang.maven.name.OnVersioned
-
- All Implemented Interfaces:
ObjectName
public final class OnVersioned extends Object implements ObjectName
Object name with default hash. If a given object does not contain a version - put the default one.- Since:
- 0.29.6
-
-
Constructor Summary
Constructors Constructor Description OnVersioned(String object, String hash)
Ctor.OnVersioned(String object, CommitHash def)
Ctor.OnVersioned(ObjectName origin, org.cactoos.Scalar<CommitHash> hash)
Ctor.OnVersioned(ObjectName origin, CommitHash hash)
Ctor.
-
-
-
Constructor Detail
-
OnVersioned
public OnVersioned(ObjectName origin, CommitHash hash)
Ctor.- Parameters:
origin
- Origin object namehash
- Default hash if a version in full name is absent.
-
OnVersioned
public OnVersioned(ObjectName origin, org.cactoos.Scalar<CommitHash> hash)
Ctor.- Parameters:
origin
- Origin object namehash
- Default hash if a version in full name is absent.
-
OnVersioned
public OnVersioned(String object, String hash)
Ctor. Please use the constructor for tests only because it can't guarantee thathash
is actually hash but not a random string.- Parameters:
object
- Object full name with a version or not.hash
- Default hash if a version in full name is absent.
-
OnVersioned
public OnVersioned(String object, CommitHash def)
Ctor.- Parameters:
object
- Object full name with a version or not.def
- Default hash if a version in full name is absent.
-
-
Method Detail
-
value
public String value()
Description copied from interface:ObjectName
Name only.- Specified by:
value
in interfaceObjectName
- Returns:
- Name.
-
hash
public CommitHash hash()
Description copied from interface:ObjectName
Hash only.- Specified by:
hash
in interfaceObjectName
- Returns:
- Hash.
-
-