public class RebaseTodoLine extends Object
Modifier and Type | Class | Description |
---|---|---|
static class |
RebaseTodoLine.Action |
Describes rebase actions
|
Constructor | Description |
---|---|
RebaseTodoLine(String newComment) |
Create a new comment line
|
RebaseTodoLine(RebaseTodoLine.Action action,
AbbreviatedObjectId commit,
String shortMessage) |
Create a new non-comment line
|
Modifier and Type | Method | Description |
---|---|---|
RebaseTodoLine.Action |
getAction() |
|
String |
getComment() |
|
AbbreviatedObjectId |
getCommit() |
|
String |
getShortMessage() |
|
void |
setAction(RebaseTodoLine.Action newAction) |
Set the action.
|
void |
setComment(String newComment) |
Set a comment for this line that is used if this line's
action is a RebaseTodoLine.Action.COMMENT |
void |
setShortMessage(String shortMessage) |
|
String |
toString() |
public RebaseTodoLine(String newComment)
newComment
- the new commentpublic RebaseTodoLine(RebaseTodoLine.Action action, AbbreviatedObjectId commit, String shortMessage)
action
- commit
- shortMessage
- public RebaseTodoLine.Action getAction()
public void setAction(RebaseTodoLine.Action newAction) throws IllegalTodoFileModification
newAction
- IllegalTodoFileModification
- on attempt to set a non-comment action on a line which was a
comment line before.public void setComment(String newComment)
Set a comment for this line that is used if this line's
action
is a RebaseTodoLine.Action.COMMENT
setComment(null)
'#'
), is an
empty string, or consists of only spaces and tabs.newComment
doesn't match these requirements
an Exception is thrown.newComment
- the commentpublic AbbreviatedObjectId getCommit()
public String getShortMessage()
public void setShortMessage(String shortMessage)
shortMessage
- public String getComment()
Copyright © 2018. All rights reserved.