com.atlassian.confluence.api.model
Class BaseApiEnum

java.lang.Object
  extended by com.atlassian.confluence.api.model.BaseApiEnum
All Implemented Interfaces:
ApiEnum
Direct Known Subclasses:
ContentRepresentation, ContentStatus, ContentType, LinkType, SpaceType

@ExperimentalSpi
public abstract class BaseApiEnum
extends Object
implements ApiEnum

Base implementation of ApiEnum with default implementations of interface methods. Concrete enum classes should extend this class rather than implementing ApiEnum directly.


Field Summary
protected  String value
           
 
Constructor Summary
protected BaseApiEnum(String value)
           
 
Method Summary
 boolean equals(Object other)
           
 String getValue()
           
 int hashCode()
           
 boolean in(BaseApiEnum... types)
           
 String serialise()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected final String value
Constructor Detail

BaseApiEnum

protected BaseApiEnum(String value)
Method Detail

getValue

public String getValue()

serialise

public String serialise()
Specified by:
serialise in interface ApiEnum
Returns:
the JSON-serialised version of this enum.

toString

public String toString()
Overrides:
toString in class Object

in

public boolean in(BaseApiEnum... types)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2003–2015 Atlassian. All rights reserved.