com.sun.electric.database.prototype
Enum PortCharacteristic

java.lang.Object
  extended by java.lang.Enum<PortCharacteristic>
      extended by com.sun.electric.database.prototype.PortCharacteristic
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PortCharacteristic>

public enum PortCharacteristic
extends java.lang.Enum<PortCharacteristic>

PortCharacteristic is a typesafe enum class that describes the function of a PortProto. PortCharacteristics are technology-independent and describe the nature of the port (input, output, etc.)


Enum Constant Summary
BIDIR
          Describes a bidirectional port.
C1
          Describes a clock phase 1 port.
C2
          Describes a clock phase 2 port.
C3
          Describes a clock phase 3 port.
C4
          Describes a clock phase 4 port.
C5
          Describes a clock phase 5 port.
C6
          Describes a clock phase 6 port.
CLK
          Describes an un-phased clock port.
GND
          Describes a ground port.
IN
          Describes an input port.
OUT
          Describes an output port.
PWR
          Describes a power port.
REFBASE
          Describes a bias-level reference base port.
REFIN
          Describes a bias-level reference input port.
REFOUT
          Describes a bias-level reference output port.
UNKNOWN
          Describes an unknown port.
 
Method Summary
static PortCharacteristic findCharacteristic(int bits)
          Method to find the characteristic associated with the given bit value.
static PortCharacteristic findCharacteristic(java.lang.String wantName)
          Method to find the characteristic associated with the given name.
static PortCharacteristic findCharacteristicShort(java.lang.String shortName)
          Method to find the characteristic associated with the given short name.
 int getBits()
          Method to return the bit value associated with this PortCharacteristic.
 java.lang.String getFullName()
          Method to return the full name of this PortCharacteristic.
 java.lang.String getName()
          Method to return the short name of this PortCharacteristic.
 int getOrder()
          Method to return the ordering of this PortCharacteristic.
static java.util.List<PortCharacteristic> getOrderedCharacteristics()
          Method to return an iterator over all of the PortCharacteristics.
 java.lang.String getShortName()
          Method to return the short name of this PortCharacteristic.
 boolean isClock()
          Method to tell whether this PortCharacteristic is a "clock".
 boolean isReference()
          Method to tell whether this PortCharacteristic is "reference".
 java.lang.String toString()
          Returns a printable version of this PortCharacteristic.
static PortCharacteristic valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PortCharacteristic[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final PortCharacteristic UNKNOWN
Describes an unknown port.


CLK

public static final PortCharacteristic CLK
Describes an un-phased clock port.


C1

public static final PortCharacteristic C1
Describes a clock phase 1 port.


C2

public static final PortCharacteristic C2
Describes a clock phase 2 port.


C3

public static final PortCharacteristic C3
Describes a clock phase 3 port.


C4

public static final PortCharacteristic C4
Describes a clock phase 4 port.


C5

public static final PortCharacteristic C5
Describes a clock phase 5 port.


C6

public static final PortCharacteristic C6
Describes a clock phase 6 port.


IN

public static final PortCharacteristic IN
Describes an input port.


OUT

public static final PortCharacteristic OUT
Describes an output port.


BIDIR

public static final PortCharacteristic BIDIR
Describes a bidirectional port.


PWR

public static final PortCharacteristic PWR
Describes a power port.


GND

public static final PortCharacteristic GND
Describes a ground port.


REFOUT

public static final PortCharacteristic REFOUT
Describes a bias-level reference output port.


REFIN

public static final PortCharacteristic REFIN
Describes a bias-level reference input port.


REFBASE

public static final PortCharacteristic REFBASE
Describes a bias-level reference base port.

Method Detail

values

public static PortCharacteristic[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PortCharacteristic c : PortCharacteristic.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PortCharacteristic valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getBits

public int getBits()
Method to return the bit value associated with this PortCharacteristic.

Returns:
the bit value associated with this PortCharacteristic.

getOrder

public int getOrder()
Method to return the ordering of this PortCharacteristic.

Returns:
the order number of this PortCharacteristic.

getFullName

public java.lang.String getFullName()
Method to return the full name of this PortCharacteristic.

Returns:
the full name of this PortCharacteristic.

getShortName

public java.lang.String getShortName()
Method to return the short name of this PortCharacteristic. The short name is one or two characters, used in JELIB files.

Returns:
the short name of this PortCharacteristic.

getName

public java.lang.String getName()
Method to return the short name of this PortCharacteristic.

Returns:
the short name of this PortCharacteristic.

isReference

public boolean isReference()
Method to tell whether this PortCharacteristic is "reference". Reference exports have an extra name that identifies the reference export.

Returns:
true if this PortCharacteristic is "reference".

isClock

public boolean isClock()
Method to tell whether this PortCharacteristic is a "clock".

Returns:
true if this PortCharacteristic is a "clock".

findCharacteristic

public static PortCharacteristic findCharacteristic(int bits)
Method to find the characteristic associated with the given bit value.

Parameters:
bits - the bit value associated with a PortCharacteristic.
Returns:
the desired PortCharacteristic (null if not found).

findCharacteristic

public static PortCharacteristic findCharacteristic(java.lang.String wantName)
Method to find the characteristic associated with the given name.

Parameters:
wantName - the name of a PortCharacteristic.
Returns:
the desired PortCharacteristic (null if not found).

findCharacteristicShort

public static PortCharacteristic findCharacteristicShort(java.lang.String shortName)
Method to find the characteristic associated with the given short name. The short name is one or two characters, used in JELIB files.

Parameters:
shortName - the short name of a PortCharacteristic.
Returns:
the desired PortCharacteristic (null if not found).

getOrderedCharacteristics

public static java.util.List<PortCharacteristic> getOrderedCharacteristics()
Method to return an iterator over all of the PortCharacteristics.

Returns:
an iterator over all of the PortCharacteristics.

toString

public java.lang.String toString()
Returns a printable version of this PortCharacteristic.

Overrides:
toString in class java.lang.Enum<PortCharacteristic>
Returns:
a printable version of this PortCharacteristic.