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 TypeMethodDescriptionchargetChar()Return the char used to represent this attributegetValue()Returns the value associated with theCharAttributewriteTo(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:CharAttributeReturn the char used to represent this attribute- Specified by:
getCharin interfaceCharAttribute- Returns:
- The character of the attribute
-
getValue
Description copied from interface:CharAttributeValueReturns the value associated with theCharAttribute- Specified by:
getValuein interfaceCharAttributeValue- Returns:
- The String value or null if no value is associated
-
writeTo
Description copied from interface:StringWritableWrite the class information to the given StringBuffer.- Specified by:
writeToin interfaceStringWritable- Parameters:
sb- Where to write the data.- Returns:
- The same StringBuffer.
-