public class ProductCodeRec extends Object implements Comparable, Jsonable
Constructor and Description |
---|
ProductCodeRec(String code,
ProductCodeType type)
Create a new ProductCode instance
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object code)
Sort this
|
ProductCodeRec |
createCopy()
Creates a deep copy of this object
|
String |
getProductCode()
Retrieve the product code
|
ProductCodeType |
getProductCodeType()
Retrieve the product code type
|
static void |
testCode(String code,
ProductCodeType type)
Tests the product code against the type.
|
javax.json.JsonObject |
toJSON()
Turn this into a json object
|
public ProductCodeRec(String code, ProductCodeType type)
code
- The codetype
- The code typeIllegalArgumentException
public ProductCodeRec createCopy()
public static final void testCode(String code, ProductCodeType type)
code
- Codetype
- Typepublic int compareTo(Object code)
compareTo
in interface Comparable
code
- Code to compare topublic String getProductCode()
public ProductCodeType getProductCodeType()
Copyright © 2017. All rights reserved.