Package com.github.vbauer.yta.model
Class Translation
- java.lang.Object
-
- com.github.vbauer.yta.model.Translation
-
- All Implemented Interfaces:
java.io.Serializable
@Immutable public abstract class Translation extends java.lang.Object implements java.io.Serializable
Model represents the result of translation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Translation()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Direction
direction()
Get translation direction.static Translation
of(Direction direction, java.lang.String text)
A factory method to create translation object using direction and translated text.abstract java.lang.String
text()
Get translated text.java.lang.String
toString()
-
-
-
Method Detail
-
direction
@Nonnull @Parameter(order=0) public abstract Direction direction()
Get translation direction.- Returns:
- direction
-
text
@Nonnull @Parameter(order=1) public abstract java.lang.String text()
Get translated text.- Returns:
- translated text
-
of
@Nonnull public static Translation of(@Nonnull Direction direction, @Nonnull java.lang.String text)
A factory method to create translation object using direction and translated text.- Parameters:
direction
- translation directiontext
- translated text- Returns:
- translation
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-