Package com.ongres.scram.common.util
Class AbstractCharAttributeValue
java.lang.Object
com.ongres.scram.common.util.AbstractStringWritable
com.ongres.scram.common.util.AbstractCharAttributeValue
- All Implemented Interfaces:
CharAttribute
,CharAttributeValue
,StringWritable
- Direct Known Subclasses:
Gs2AttributeValue
,ScramAttributeValue
public class AbstractCharAttributeValue
extends AbstractStringWritable
implements CharAttributeValue
Construct and write generic CharAttribute-Value pairs.
Concrete sub-classes should also provide a static parse(String) creation method.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchar
getChar()
Return the char used to represent this attributegetValue()
Returns the value associated with theCharAttribute
writeTo
(StringBuffer sb) Write the class information to the given StringBuffer.Methods inherited from class com.ongres.scram.common.util.AbstractStringWritable
toString
-
Field Details
-
charAttribute
-
value
-
-
Constructor Details
-
AbstractCharAttributeValue
public AbstractCharAttributeValue(CharAttribute charAttribute, String value) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
-
Method Details
-
getChar
public char getChar()Description copied from interface:CharAttribute
Return the char used to represent this attribute- Specified by:
getChar
in interfaceCharAttribute
- Returns:
- The character of the attribute
-
getValue
Description copied from interface:CharAttributeValue
Returns the value associated with theCharAttribute
- Specified by:
getValue
in interfaceCharAttributeValue
- Returns:
- The String value or null if no value is associated
-
writeTo
Description copied from interface:StringWritable
Write the class information to the given StringBuffer.- Specified by:
writeTo
in interfaceStringWritable
- Parameters:
sb
- Where to write the data.- Returns:
- The same StringBuffer.
-