Class Entity
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.Entity
-
public final class Entity extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntity.EntityType
-
Field Summary
Fields Modifier and Type Field Description static EntityDISCOUNT_CAMPAIGNstatic EntityDISCOUNT_OFFERstatic EntityUNKNOWN
-
Constructor Summary
Constructors Constructor Description Entity(Entity.EntityType pLiteral)Initialize object from real enumeration literalEntity(java.lang.String pLiteralName)Initialize object using the name of the literal.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object pObject)Object.equals(Object)Entity.EntityTypegetLiteral()Method returns the literal that is represented by this object.java.lang.StringgetUnknownLiteralName()Method returns the actual name of the unknown literalinthashCode()Object.hashCode()booleanisUnknownLiteral()Method checks if the represented literal is actually unknown or not.java.lang.StringtoString()Object.toString()static EntityvalueOf(java.lang.String pLiteralName)Method returns extensible enumeration based on the passed name.
-
-
-
Constructor Detail
-
Entity
public Entity(Entity.EntityType pLiteral)
Initialize object from real enumeration literal- Parameters:
pLiteral- Enumeration literal that should be used to initialize the extensible enumeration. The parameter must not be null.
-
Entity
public Entity(java.lang.String pLiteralName)
Initialize object using the name of the literal.- Parameters:
pLiteralName- Literal name that should be used to initialize the extensible enumeration. If the parameter is null or has an unknown literal name then a "unknown" version will be created.- See Also:
isUnknownLiteral()
-
-
Method Detail
-
valueOf
public static Entity valueOf(java.lang.String pLiteralName)
Method returns extensible enumeration based on the passed name. If the literal name is unknown then an instance representing "unknown" will be returned.- Parameters:
pLiteral- Enumeration literal that should be used to initialize the extensible enumeration. The parameter must not be null.- Returns:
-
getLiteral
public Entity.EntityType getLiteral()
Method returns the literal that is represented by this object.- Returns:
EntityLiteral that is represented by this object. The method never returns null.
-
isUnknownLiteral
public boolean isUnknownLiteral()
Method checks if the represented literal is actually unknown or not.- Returns:
- boolean Method returns true if this object represents an unknown literal.
-
getUnknownLiteralName
public java.lang.String getUnknownLiteralName()
Method returns the actual name of the unknown literal- Returns:
StringName of the unknown literal or null in case that the literal is known.
-
hashCode
public int hashCode()
Object.hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object pObject)
Object.equals(Object)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
Object.toString()- Overrides:
toStringin classjava.lang.Object
-
-