|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.priha.core.values.ValueImpl
public abstract class ValueImpl
Implements the Value interface and provides a number of default accessors for easy development. All accessors by default throw a ValueFormatException, so you will want to implement those which you can convert to.
Field Summary | |
---|---|
protected org.priha.core.values.ValueImpl.VALUE_STATE |
m_state
|
Constructor Summary | |
---|---|
protected |
ValueImpl()
|
Method Summary | |
---|---|
protected void |
checkStream()
This method makes sure that the Value value is a stream, not a value. |
protected void |
checkValue()
This method makes sure that the Value value is a value, not a stream. |
int |
compareTo(ValueImpl value)
By default, does String comparison, which means it may fail. |
boolean |
equals(java.lang.Object o)
|
boolean |
getBoolean()
|
java.util.Calendar |
getDate()
|
double |
getDouble()
|
long |
getLong()
|
long |
getSize()
Returns the approximate size of this object in bytes. |
java.io.InputStream |
getStream()
By default, returns the inputstream of the String representation. |
java.lang.String |
getString()
|
java.lang.String |
toString()
|
java.lang.String |
valueAsString()
Allows getting the Value as a String without regard to the current Stream/Value format setting. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected org.priha.core.values.ValueImpl.VALUE_STATE m_state
Constructor Detail |
---|
protected ValueImpl()
Method Detail |
---|
protected final void checkStream() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- If this is a value Value.protected final void checkValue() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- If this is a stream value.public boolean getBoolean() throws ValueFormatException, java.lang.IllegalStateException, RepositoryException
ValueFormatException
java.lang.IllegalStateException
RepositoryException
public java.util.Calendar getDate() throws ValueFormatException, java.lang.IllegalStateException, RepositoryException
ValueFormatException
java.lang.IllegalStateException
RepositoryException
public double getDouble() throws ValueFormatException, java.lang.IllegalStateException, RepositoryException
ValueFormatException
java.lang.IllegalStateException
RepositoryException
public long getLong() throws ValueFormatException, java.lang.IllegalStateException, RepositoryException
ValueFormatException
java.lang.IllegalStateException
RepositoryException
public java.io.InputStream getStream() throws java.lang.IllegalStateException, RepositoryException
java.lang.IllegalStateException
RepositoryException
public java.lang.String getString() throws ValueFormatException, java.lang.IllegalStateException, RepositoryException
ValueFormatException
java.lang.IllegalStateException
RepositoryException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String valueAsString()
public long getSize()
public int compareTo(ValueImpl value)
compareTo
in interface java.lang.Comparable<ValueImpl>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |