Class AbstractCharAttributeValue
- java.lang.Object
-
- com.impossibl.postgres.protocol.sasl.scram.util.AbstractStringWritable
-
- com.impossibl.postgres.protocol.sasl.scram.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.
-
-
Constructor Summary
Constructors Constructor Description AbstractCharAttributeValue(CharAttribute charAttribute, String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description chargetChar()Return the char used to represent this attributeStringgetValue()Returns the value associated with theCharAttributeStringBufferwriteTo(StringBuffer sb)Write the class information to the given StringBuffer.-
Methods inherited from class com.impossibl.postgres.protocol.sasl.scram.util.AbstractStringWritable
toString
-
-
-
-
Constructor Detail
-
AbstractCharAttributeValue
public AbstractCharAttributeValue(CharAttribute charAttribute, String value) throws IllegalArgumentException
- Throws:
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 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 StringBuffer writeTo(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.
-
-