com.atlassian.jira.issue.customfields.option
Class MockSimpleOption

java.lang.Object
  extended by com.atlassian.jira.issue.customfields.option.MockSimpleOption
All Implemented Interfaces:
SimpleOption<MockSimpleOption>

public class MockSimpleOption
extends Object
implements SimpleOption<MockSimpleOption>

Since:
v6.1

Constructor Summary
MockSimpleOption()
           
MockSimpleOption(SimpleOption<?> option)
           
 
Method Summary
 MockSimpleOption addChild(String value)
           
 boolean equals(Object o)
           
 List<MockSimpleOption> getChildOptions()
          Return a list of options that exist under this option (i.e.
 Long getOptionId()
          The ID of the option or null if it currently does not have one.
 String getValue()
          The current value of the option.
 int hashCode()
           
 MockSimpleOption parent()
           
 MockSimpleOption parent(MockSimpleOption parent)
           
 MockSimpleOption setId(Long id)
           
 MockSimpleOption setValue(String value)
           
static com.google.common.base.Function<SimpleOption<?>,MockSimpleOption> toMock()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockSimpleOption

public MockSimpleOption()

MockSimpleOption

public MockSimpleOption(SimpleOption<?> option)
Method Detail

toMock

public static com.google.common.base.Function<SimpleOption<?>,MockSimpleOption> toMock()

getOptionId

@Nullable
public Long getOptionId()
Description copied from interface: SimpleOption
The ID of the option or null if it currently does not have one.

Specified by:
getOptionId in interface SimpleOption<MockSimpleOption>
Returns:
the ID of the option or null if it does not have one.

setId

public MockSimpleOption setId(Long id)

getValue

public String getValue()
Description copied from interface: SimpleOption
The current value of the option. This is the option displayed to the user.

Specified by:
getValue in interface SimpleOption<MockSimpleOption>
Returns:
the value of the option.

setValue

public MockSimpleOption setValue(String value)

getChildOptions

@Nonnull
public List<MockSimpleOption> getChildOptions()
Description copied from interface: SimpleOption
Return a list of options that exist under this option (i.e. its children).

Specified by:
getChildOptions in interface SimpleOption<MockSimpleOption>
Returns:
the list of options that exist under this option. An empty list is returned when such options exist.

parent

public MockSimpleOption parent()

parent

public MockSimpleOption parent(MockSimpleOption parent)

addChild

public MockSimpleOption addChild(String value)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002-2014 Atlassian. All Rights Reserved.