Package org.eolang.maven.name
Class OnSwap
- java.lang.Object
-
- org.eolang.maven.name.OnSwap
-
- All Implemented Interfaces:
ObjectName
public final class OnSwap extends Object implements ObjectName
Swapped object name. Depends on encapsulated condition behaves like one of the encapsulated object names. If a second object is not provided - behaves likeOnUnversioned
- Since:
- 0.29.6
-
-
Constructor Summary
Constructors Constructor Description OnSwap(boolean condition, ObjectName def)
Ctor.OnSwap(boolean condition, ObjectName first, ObjectName second)
Ctor.
-
-
-
Constructor Detail
-
OnSwap
public OnSwap(boolean condition, ObjectName def)
Ctor.- Parameters:
condition
- Condition.def
- Default object name.
-
OnSwap
public OnSwap(boolean condition, ObjectName first, ObjectName second)
Ctor.- Parameters:
condition
- Condition.first
- First object name.second
- Second object name.
-
-
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.
-
-