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 Modifier and Type Field Description private CharAttributecharAttributeprivate java.lang.Stringvalue
-
Constructor Summary
Constructors Constructor Description AbstractCharAttributeValue(CharAttribute charAttribute, java.lang.String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description chargetChar()Return the char used to represent this attributejava.lang.StringgetValue()Returns the value associated with theCharAttributejava.lang.StringBufferwriteTo(java.lang.StringBuffer sb)Write the class information to the given StringBuffer.-
Methods inherited from class com.ongres.scram.common.util.AbstractStringWritable
toString
-
-
-
-
Field Detail
-
charAttribute
private final CharAttribute charAttribute
-
value
private final java.lang.String value
-
-
Constructor Detail
-
AbstractCharAttributeValue
public AbstractCharAttributeValue(CharAttribute charAttribute, java.lang.String value) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
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
public java.lang.String 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
public java.lang.StringBuffer writeTo(java.lang.StringBuffer sb)
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.
-
-