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 CharAttribute
charAttribute
private java.lang.String
value
-
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 char
getChar()
Return the char used to represent this attributejava.lang.String
getValue()
Returns the value associated with theCharAttribute
java.lang.StringBuffer
writeTo(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:CharAttribute
Return the char used to represent this attribute- Specified by:
getChar
in interfaceCharAttribute
- Returns:
- The character of the attribute
-
getValue
public java.lang.String 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
public java.lang.StringBuffer writeTo(java.lang.StringBuffer sb)
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.
-
-