org.quattor.pan.utils
Class TermFactory

java.lang.Object
  extended by org.quattor.pan.utils.TermFactory

public class TermFactory
extends java.lang.Object

A factory to generate Term objects. The produced objects are just standard StringProperty and LongProperty instances.

Author:
loomis

Method Summary
static int compare(Term self, Term other)
          A utility method to allow the comparison of any two terms.
static Term create(Element element)
          Create a term from a given element.
static Term create(long index)
          Create a term directly from a long index.
static Term create(java.lang.String term)
          Constructor of a path from a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Term create(java.lang.String term)
Constructor of a path from a String. If the path does not have the correct syntax, an IllegalArgumentException will be thrown.


create

public static Term create(long index)
Create a term directly from a long index.

Parameters:
index - the index to use for this term

create

public static Term create(Element element)
Create a term from a given element.

Parameters:
element - the element to create the term from

compare

public static int compare(Term self,
                          Term other)
A utility method to allow the comparison of any two terms.



Copyright © 2011 Quattor. All Rights Reserved.