PDF Clown
0.1.2

org.pdfclown.objects
Class PdfSimpleObject<TValue>

java.lang.Object
  extended by org.pdfclown.objects.PdfObject
      extended by org.pdfclown.objects.PdfDataObject
          extended by org.pdfclown.objects.PdfDirectObject
              extended by org.pdfclown.objects.PdfSimpleObject<TValue>
All Implemented Interfaces:
Cloneable, Comparable<PdfDirectObject>, IVisitable
Direct Known Subclasses:
PdfBoolean, PdfName, PdfNumber, PdfString

public abstract class PdfSimpleObject<TValue>
extends PdfDirectObject

Abstract PDF simple object.

Version:
0.1.2, 12/28/12
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
PdfSimpleObject()
           
 
Method Summary
 PdfSimpleObject<TValue> clone(File context)
          Creates a deep copy of this object within the specified file context.
 boolean equals(Object object)
           
static PdfSimpleObject<?> get(Object value)
          Gets the object equivalent to the given value.
 PdfObject getParent()
          Gets the parent of this object.
 TValue getRawValue()
          Gets the low-level representation of the value.
 Object getValue()
          Gets the high-level representation of the value.
static Object getValue(PdfObject object)
          Gets the value corresponding to the given object.
static Object getValue(PdfObject object, Object defaultValue)
          Gets the value corresponding to the given object.
 int hashCode()
           
 boolean isUpdateable()
          Gets whether the detection of object state changes is enabled.
 boolean isUpdated()
          Gets whether the initial state of this object has been modified.
protected  boolean isVirtual()
          Gets whether this object acts like a null-object placeholder.
protected  void setRawValue(TValue value)
           
 void setUpdateable(boolean value)
           
protected  void setUpdated(boolean value)
           
protected  void setValue(Object value)
           
protected  void setVirtual(boolean value)
           
 PdfSimpleObject<TValue> swap(PdfObject other)
          Swaps contents between this object and the other one.
 String toString()
           
 
Methods inherited from class org.pdfclown.objects.PdfDirectObject
compareTo
 
Methods inherited from class org.pdfclown.objects.PdfObject
clone, clone, getContainer, getDataContainer, getFile, getIndirectObject, getReference, resolve, resolve, unresolve, unresolve, update, writeTo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.pdfclown.objects.IVisitable
accept
 

Constructor Detail

PdfSimpleObject

public PdfSimpleObject()
Method Detail

get

public static PdfSimpleObject<?> get(Object value)
Gets the object equivalent to the given value.


getValue

public static Object getValue(PdfObject object)
Gets the value corresponding to the given object.

Parameters:
object - Object to extract the value from.

getValue

public static Object getValue(PdfObject object,
                              Object defaultValue)
Gets the value corresponding to the given object.

Parameters:
object - Object to extract the value from.
defaultValue - Value returned in case the object's one is undefined.

clone

public final PdfSimpleObject<TValue> clone(File context)
Description copied from class: PdfObject
Creates a deep copy of this object within the specified file context.

Overrides:
clone in class PdfObject

equals

public boolean equals(Object object)
Overrides:
equals in class Object

getParent

public final PdfObject getParent()
Description copied from class: PdfObject
Gets the parent of this object.

Specified by:
getParent in class PdfObject
See Also:
PdfObject.getContainer()

getRawValue

public TValue getRawValue()
Gets the low-level representation of the value.


getValue

public Object getValue()
Gets the high-level representation of the value.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

isUpdated

public final boolean isUpdated()
Description copied from class: PdfObject
Gets whether the initial state of this object has been modified.

Specified by:
isUpdated in class PdfObject

isUpdateable

public final boolean isUpdateable()
Description copied from class: PdfObject
Gets whether the detection of object state changes is enabled.

Specified by:
isUpdateable in class PdfObject

setUpdateable

public final void setUpdateable(boolean value)
Specified by:
setUpdateable in class PdfObject
See Also:
PdfObject.isUpdateable()

swap

public PdfSimpleObject<TValue> swap(PdfObject other)
Description copied from class: PdfObject
Swaps contents between this object and the other one.

Specified by:
swap in class PdfObject
Parameters:
other - Object whose contents have to be swapped with this one's.
Returns:
This object.

toString

public String toString()
Overrides:
toString in class Object

isVirtual

protected boolean isVirtual()
Description copied from class: PdfObject
Gets whether this object acts like a null-object placeholder.

Specified by:
isVirtual in class PdfObject

setRawValue

protected void setRawValue(TValue value)
See Also:
getRawValue()

setUpdated

protected final void setUpdated(boolean value)
Specified by:
setUpdated in class PdfObject
See Also:
PdfObject.isUpdated()

setValue

protected void setValue(Object value)
See Also:
getValue()

setVirtual

protected void setVirtual(boolean value)
Specified by:
setVirtual in class PdfObject
See Also:
PdfObject.isVirtual()

PDF Clown
0.1.2

Project home page

Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.