FreeHEP API
Version v1.2.2

hep.graphics.heprep.util
Class HepRepUtil

java.lang.Object
  |
  +--hep.graphics.heprep.util.HepRepUtil

public class HepRepUtil
extends Object

Version:
$Id: HepRepUtil.java,v 1.20 2003/12/09 21:07:40 duns Exp $
Author:
Mark Donszelmann

Field Summary
static String cvsId
           
static Iterator empty
           
static Collection emptyCollection
           
static List emptyList
           
static Set emptySet
           
 
Method Summary
static void copyAttributes(HepRepAttribute src, HepRepAttribute dst)
          copy all attributes (defs and values) from node src to node dst
static boolean debug()
          Print statements in equal methods
static long decodeHex(String s)
          Decodes a non-negative Hex number into a long
static double decodeNumber(String s)
          Decodes a String into a Double.
static long decodeSpecial(String s)
          Decodes a non-negative Special number into a long
static String encodeSpecial(long d)
           
static HepRepIterator getInstances(HepRepInstanceTree instanceTree, List layers)
          Returns an iterator which walks the full list of instances within a HepRepInstanceTree
static HepRepType getType(Set types, String name)
          Look for hierarchical type name in set of types, checking its subtypes.
static Iterator iterator(Iterator first, Iterator second)
          iterates two iterations in order
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cvsId

public static final String cvsId
See Also:
Constant Field Values

empty

public static final Iterator empty

emptyCollection

public static final Collection emptyCollection

emptyList

public static final List emptyList

emptySet

public static final Set emptySet
Method Detail

debug

public static boolean debug()
Print statements in equal methods


decodeNumber

public static double decodeNumber(String s)
Decodes a String into a Double. The string can have the following formats:
      0ds :   where number is the DoubleToLongBits encoding in special format
      0d0x:   where number is the DoubleToLongBits encoding in hex
      0d# :   where number is the DoubleToLongBits encoding in hex
      0d  :   where number is the DoubleToLongBits encoding in decimal
      0x  :   where number is the Hex encoding of a Long
          :   where number contains (.Ee) and is parsed into a Double
          :   where number contains no (.Ee) and is parsed into a Long
 


decodeHex

public static long decodeHex(String s)
                      throws NumberFormatException
Decodes a non-negative Hex number into a long

NumberFormatException

decodeSpecial

public static long decodeSpecial(String s)
                          throws NumberFormatException
Decodes a non-negative Special number into a long

NumberFormatException

encodeSpecial

public static String encodeSpecial(long d)

main

public static void main(String[] args)

copyAttributes

public static void copyAttributes(HepRepAttribute src,
                                  HepRepAttribute dst)
                           throws CloneNotSupportedException
copy all attributes (defs and values) from node src to node dst

CloneNotSupportedException

getType

public static HepRepType getType(Set types,
                                 String name)
Look for hierarchical type name in set of types, checking its subtypes.


getInstances

public static HepRepIterator getInstances(HepRepInstanceTree instanceTree,
                                          List layers)
Returns an iterator which walks the full list of instances within a HepRepInstanceTree

Parameters:
instanceTree - HepRepInstanceTree to be iterated over
layers - list of layers to iteratate over or null.

iterator

public static Iterator iterator(Iterator first,
                                Iterator second)
iterates two iterations in order


FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.