public class Specification
extends java.lang.Object
Constructor and Description |
---|
Specification(java.lang.String fullName)
Construct from a String that encodes name and version fields.
|
Modifier and Type | Method and Description |
---|---|
int |
compareVersion(Specification other)
Compares major version number of the given Specification with this
receiver.
|
boolean |
equals(java.lang.Object other)
Affirms if the given argument is equal to this receiver.
|
Compatibility |
getCompatibility()
Return the compatibility object associated with this Specification instance.
|
java.lang.String |
getDescription() |
java.lang.String |
getMinorVersion() |
java.lang.String |
getName() |
int |
getVersion() |
boolean |
isSame(Specification other)
Affirms if the given specification has the same name of this receiver,
ignoring the case.
|
boolean |
isSame(java.lang.String other)
Affirms if the given string equals name of this receiver, ignoring the
case.
|
void |
setCompatibility(Compatibility compatibility)
Associate a compatibility object with this Specification instance
|
Specification |
setDescription(java.lang.String description) |
java.lang.String |
toString() |
public Specification(java.lang.String fullName)
fullName
- a encoded string in the following prescribed format.
name major.minor
e.g. JPA 2.0-draft
Only the 'name' field is mandatory.
'major' version defaults to 1 and must be an integer.
'minor' version defaults to 0 and can be a String.public java.lang.String getName()
public int getVersion()
public java.lang.String getMinorVersion()
public java.lang.String getDescription()
public Specification setDescription(java.lang.String description)
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean isSame(Specification other)
public boolean isSame(java.lang.String other)
public int compareVersion(Specification other)
public java.lang.String toString()
toString
in class java.lang.Object
public void setCompatibility(Compatibility compatibility)
compatibility
- a Compatibility object with flags set in compliance
with this Specification instance.public Compatibility getCompatibility()
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.