public abstract class Codes<PLAIN,CIPHER> extends Object implements Comparable<Codes<?,?>>
| 限定符 | 构造器和说明 |
|---|---|
protected |
Codes() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(Codes<?,?> o) |
abstract PLAIN |
decode(CIPHER cipherObj,
Type plainType)
decode cipher object to plain object
|
abstract CIPHER |
encode(PLAIN plainObj)
encode plain object to cipher object
|
boolean |
matchDecodeType(Type plainType)
this method decide whether use decode method
|
boolean |
matchEncodeObject(Object plainObj)
this method decide whether use encode method
|
abstract int |
order()
order of this codes
|
public abstract int order()
public boolean matchEncodeObject(Object plainObj)
plainObj - plain object to be encodedthis#encode(Object)public boolean matchDecodeType(Type plainType)
plainType - the type of plain objectthis#decode(Object, Type)public abstract CIPHER encode(PLAIN plainObj)
plainObj - plain object to be encodedpublic abstract PLAIN decode(CIPHER cipherObj, Type plainType)
cipherObj - cipher object to be decodedplainType - expected type of plain objectpublic int compareTo(@Nonnull Codes<?,?> o)
compareTo 在接口中 Comparable<Codes<?,?>>Copyright © 2020. All rights reserved.