FreeHEP API
Version current

hep.graphics.heprep.util
Class HepRepUtil

java.lang.Object
  extended byhep.graphics.heprep.util.HepRepUtil

public class HepRepUtil
extends Object

Version:
$Id: HepRepUtil.java,v 1.32 2005/02/17 15:20:10 duns Exp $
Author:
Mark Donszelmann
Source Code:
HepRepUtil.java

Field Summary
static String cvsId
           
 
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 Set getAllLayerNames(HepRepInstanceTree instanceTree, boolean checkVisible, boolean checkPickable)
          Returns a Set of all layernames which are used.
static HepRepConverter getHepRepConverter(org.openide.util.Lookup registry, Class cls)
          Deprecated. use getHepRepProvider().
static HepRepProvider getHepRepProvider(org.openide.util.Lookup registry, Object object)
          Finds the first HepRepProvider which converts object.
static HepRepIterator getInstances(List instanceTrees, List layers, Set types, boolean iterateFrames)
          Returns an iterator which walks the full list of instances within a list of HepRepInstanceTrees
static HepRepType getType(Collection types, String name)
          Look for hierarchical type name in Collection (Set) of types, checking its subtypes.
static String getUnit(HepRepAttDef attDef)
          Returns the Unit from the extra info.
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
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

Throws:
NumberFormatException

decodeSpecial

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

Throws:
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

Throws:
CloneNotSupportedException

getType

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


getInstances

public static HepRepIterator getInstances(List instanceTrees,
                                          List layers,
                                          Set types,
                                          boolean iterateFrames)
Returns an iterator which walks the full list of instances within a list of HepRepInstanceTrees

Parameters:
layers - list of layers to iteratate over or null.

iterator

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


getHepRepProvider

public static HepRepProvider getHepRepProvider(org.openide.util.Lookup registry,
                                               Object object)
Finds the first HepRepProvider which converts object. Return null if not found.


getHepRepConverter

public static HepRepConverter getHepRepConverter(org.openide.util.Lookup registry,
                                                 Class cls)
Deprecated. use getHepRepProvider().

Finds the first HepRepConverter which handles object. For backwards compatibility. Return null if not found.


getUnit

public static String getUnit(HepRepAttDef attDef)
Returns the Unit from the extra info. Normally the string up to the first colon, or null if extra is null.


getAllLayerNames

public static Set getAllLayerNames(HepRepInstanceTree instanceTree,
                                   boolean checkVisible,
                                   boolean checkPickable)
Returns a Set of all layernames which are used.


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.