|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.database.ImmutableElectricObject
com.sun.electric.database.ImmutableArcInst
public class ImmutableArcInst
Immutable class ImmutableArcInst represents an arc instance.
Nested Class Summary | |
---|---|
static class |
ImmutableArcInst.Flag
Class to access a flag in user bits of ImmutableNodeInst. |
Field Summary | |
---|---|
static Variable.Key |
ARC_RADIUS
Key of Varible holding arc curvature. |
int |
arcId
id of this ArcInst in parent. |
static Name |
BASENAME
prefix for autonameing. |
static ImmutableArcInst.Flag |
BODY_ARROWED
Flag to set an ImmutableArcInst to be directional, with an arrow line drawn down the center. |
static int |
DEFAULT_FLAGS
initial bits |
static ImmutableArrayList<ImmutableArcInst> |
EMPTY_LIST
|
static ImmutableArcInst.Flag |
FIXED_ANGLE
Flag to set an ImmutableArcInst to be fixed-angle. |
static ImmutableArcInst.Flag |
HARD_SELECT
Flag to set an ImmutableArcInst to be hard-to-select. |
static ImmutableArcInst.Flag |
HEAD_ARROWED
Flag to set an ImmutableArcInst to be directional, with an arrow on the head. |
static ImmutableArcInst.Flag |
HEAD_EXTENDED
Flag to set the head of an ImmutableArcInst to be extended. |
static ImmutableArcInst.Flag |
HEAD_NEGATED
Flag to set the head of an ImmutableArcInst to be negated. |
static int |
HEADEND
The index of the head of this ArcInst. |
EPoint |
headLocation
Location of head end of this ImmutableArcInst. |
int |
headNodeId
NodeId on head end of this ImmutableArcInst. |
PortProtoId |
headPortId
PortProtoId on head end of this ImmutableArcInst. |
Name |
name
name of this ImmutableArcInst. |
TextDescriptor |
nameDescriptor
The text descriptor of name of ImmutableArcInst. |
static ImmutableArcInst[] |
NULL_ARRAY
|
ArcProtoId |
protoId
Arc prototype. |
static ImmutableArcInst.Flag |
RIGID
Flag to set an ImmutableArcInst to be rigid. |
static ImmutableArcInst.Flag |
SLIDABLE
Flag to set an ImmutableArcInst to be slidable. |
static ImmutableArcInst.Flag |
TAIL_ARROWED
Flag to set an ImmutableArcInst to be directional, with an arrow on the tail. |
static ImmutableArcInst.Flag |
TAIL_EXTENDED
Flag to set the tail of an ImmutableArcInst to be is extended. |
static ImmutableArcInst.Flag |
TAIL_NEGATED
Flag to set the tail of an ImmutableArcInst to be negated. |
static int |
TAILEND
The index of the tail of this ArcInst. |
EPoint |
tailLocation
Location of tail end of this ImmutableArcInst. |
int |
tailNodeId
NodeId on tail end of this ImmutableArcInst. |
PortProtoId |
tailPortId
PortProtoId on tail end of this ImmutableArcInst. |
Fields inherited from class com.sun.electric.database.ImmutableElectricObject |
---|
flags |
Method Summary | |
---|---|
static int |
angleFromElib(int elibBits)
Get angle from ELIB user bits. |
void |
check()
Checks invariant of this ImmutableArcInst. |
boolean |
check(TechPool techPool)
|
boolean |
equalsExceptVariables(ImmutableElectricObject o)
Indicates whether fields of other ImmutableElectricObject are equal to fileds of this object. |
static int |
flagsFromElib(int elibBits)
Method to convert ELIB userbits to database flags. |
int |
getAngle()
Method to return the rotation angle of this ImmutableArcInst. |
int |
getElibBits()
Method to compute the "userbits" to use for a given ArcInst. |
long |
getGridExtendOverMin()
Returns extend of this ImmutableArcInst over minimal-width arc of this type in grid units. |
double |
getGridLength()
Returns length of this ImmutableArcInst in grid units. |
double |
getLambdaExtendOverMin()
Returns extend of this ImmutableArcInst over minimal-width arc of this type in lambda units. |
double |
getLambdaLength()
Returns length of this ImmutableArcInst in lambda units. |
int |
getOppositeAngle()
Method to return the opposite rotation angle of this ImmutableArcInst. |
java.lang.Double |
getRadius()
Method to get the curvature radius on this ImmutableArcInst. |
int |
hashCodeExceptVariables()
Return a hash code value for fields of this object. |
boolean |
is(ImmutableArcInst.Flag flag)
Tests specific flag is set on this ImmutableArcInst. |
boolean |
isArrowed(int connIndex)
Method to determine whether this ImmutableArcInst is directional, with an arrow on one end. |
boolean |
isBodyArrowed()
Method to determine whether this ArcInst is directional, with an arrow line drawn down the center. |
boolean |
isExtended(int connIndex)
Method to tell whether an end of ImmutableArcInst has its ends extended. |
boolean |
isFixedAngle()
Method to tell whether this ImmutableArcInst is fixed-angle. |
boolean |
isHardSelect()
Method to tell whether this ArcInst is hard-to-select. |
boolean |
isHeadArrowed()
Method to determine whether this ImmutableArcInst is directional, with an arrow on the head. |
boolean |
isHeadExtended()
Method to tell whether the head of this arc is extended. |
boolean |
isHeadNegated()
Method to tell whether the head of this arc is negated. |
boolean |
isManhattan()
Returns true if this ImmutableArcInst is either horizontal or vertical. |
boolean |
isNegated(int connIndex)
Method to tell whether an end of this arc is negated. |
boolean |
isRigid()
Method to tell whether this ImmutableArcInst is rigid. |
boolean |
isSlidable()
Method to tell whether this ImmutableArcInst is slidable. |
boolean |
isTailArrowed()
Method to determine whether this ImmutableArcInst is directional, with an arrow on the tail. |
boolean |
isTailExtended()
Method to tell whether the tail of this arc is extended. |
boolean |
isTailNegated()
Method to tell whether the tail of this arc is negated. |
boolean |
isUsernamed()
Retruns true if this ImmutableArcInst was named by user. |
boolean |
isZeroLength()
Returns true if length of this ImmutableArcInst is zero. |
void |
makeGridBoxInt(int[] intCoords,
boolean tailExtended,
boolean headExtended,
int gridExtend)
Method to fill in an AbstractShapeBuilder a polygon that describes this ImmutableArcInst in grid units. |
static ImmutableArcInst |
newInstance(int arcId,
ArcProtoId protoId,
Name name,
TextDescriptor nameDescriptor,
int tailNodeId,
PortProtoId tailPortId,
EPoint tailLocation,
int headNodeId,
PortProtoId headPortId,
EPoint headLocation,
long gridExtendOverMin,
int angle,
int flags)
Returns new ImmutableArcInst object. |
ImmutableArcInst |
withAngle(int angle)
Returns ImmutableArcInst which differs from this ImmutableArcInst by angke. |
ImmutableArcInst |
withFlag(ImmutableArcInst.Flag flag,
boolean value)
Returns ImmutableArcInst which differs from this ImmutableArcInst by flag bit. |
ImmutableArcInst |
withFlags(int flags)
Returns ImmutableArcInst which differs from this ImmutableArcInst by user bits. |
ImmutableArcInst |
withGridExtendOverMin(long gridExtendOverMin)
Returns ImmutableArcInst which differs from this ImmutableArcInst by width. |
ImmutableArcInst |
withLocations(EPoint tailLocation,
EPoint headLocation)
Returns ImmutableArcInst which differs from this ImmutableArcInst by tailLocation and headLocation. |
ImmutableArcInst |
withName(Name name)
Returns ImmutableArcInst which differs from this ImmutableArcInst by name. |
ImmutableArcInst |
withNameDescriptor(TextDescriptor nameDescriptor)
Returns ImmutableArcInst which differs from this ImmutableArcInst by name descriptor. |
ImmutableArcInst |
withoutVariable(Variable.Key key)
Returns ImmutableArcInst which differs from this ImmutableArcInst by removing Variable with the specified key. |
ImmutableArcInst |
withVariable(Variable var)
Returns ImmutableArcInst which differs from this ImmutableArcInst by additional Variable. |
Methods inherited from class com.sun.electric.database.ImmutableElectricObject |
---|
getNumVariables, getVar, getVar, getVariables, getVarValue, searchVar, toVariableArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TAILEND
public static final int HEADEND
public static final Variable.Key ARC_RADIUS
public static final ImmutableArcInst.Flag RIGID
public static final ImmutableArcInst.Flag FIXED_ANGLE
public static final ImmutableArcInst.Flag SLIDABLE
public static final ImmutableArcInst.Flag TAIL_ARROWED
public static final ImmutableArcInst.Flag HEAD_ARROWED
public static final ImmutableArcInst.Flag BODY_ARROWED
public static final ImmutableArcInst.Flag TAIL_EXTENDED
public static final ImmutableArcInst.Flag HEAD_EXTENDED
public static final ImmutableArcInst.Flag TAIL_NEGATED
public static final ImmutableArcInst.Flag HEAD_NEGATED
public static final ImmutableArcInst.Flag HARD_SELECT
public static final int DEFAULT_FLAGS
public static final Name BASENAME
public static final ImmutableArcInst[] NULL_ARRAY
public static final ImmutableArrayList<ImmutableArcInst> EMPTY_LIST
public final int arcId
public final ArcProtoId protoId
public final Name name
public final TextDescriptor nameDescriptor
public final int tailNodeId
public final PortProtoId tailPortId
public final EPoint tailLocation
public final int headNodeId
public final PortProtoId headPortId
public final EPoint headLocation
Method Detail |
---|
public boolean isUsernamed()
public double getLambdaExtendOverMin()
public long getGridExtendOverMin()
public double getLambdaLength()
public double getGridLength()
public boolean isZeroLength()
public int getAngle()
public int getOppositeAngle()
public boolean is(ImmutableArcInst.Flag flag)
flag
- flag selector.
public boolean isRigid()
public boolean isFixedAngle()
public boolean isSlidable()
public boolean isHardSelect()
public boolean isArrowed(int connIndex)
connIndex
- TAILEND (0) for the tail of this ArcInst, HEADEND (1) for the head.
public boolean isTailArrowed()
public boolean isHeadArrowed()
public boolean isBodyArrowed()
public boolean isExtended(int connIndex)
connIndex
- TAILEND (0) for the tail of this ArcInst, HEADEND (1) for the head.
public boolean isTailExtended()
public boolean isHeadExtended()
public boolean isNegated(int connIndex)
connIndex
- TAILEND (0) for the tail of this ArcInst, HEADEND (1) for the head.
public boolean isTailNegated()
public boolean isHeadNegated()
public boolean isManhattan()
public static ImmutableArcInst newInstance(int arcId, ArcProtoId protoId, Name name, TextDescriptor nameDescriptor, int tailNodeId, PortProtoId tailPortId, EPoint tailLocation, int headNodeId, PortProtoId headPortId, EPoint headLocation, long gridExtendOverMin, int angle, int flags)
arcId
- id of this ArcInst in parent.protoId
- Id of arc prototype.name
- name of this ImmutableArcInst.nameDescriptor
- TextDescriptor of name of this ImmutableArcInst.tailNodeId
- NodeId on tail end of this ImmutableArcInst.tailPortId
- PortProtoId on tail end of this ImmutableArcInst.tailLocation
- Location of tail end of this ImmutableArcInst.headNodeId
- NodeId on head end of this ImmutableArcInst.headPortId
- PortProtoId on head end of this ImmutableArcInst.headLocation
- Location of head end of this ImmutableArcInst.gridExtendOverMin
- the extend of this ImmutableArcInst over minimal-width arc of this type in grid units.angle
- the angle if this ImmutableArcInst (in tenth-degrees).flags
- flag bits of this ImmutableNodeInst.
java.lang.NullPointerException
- if protoType, name, tailPortId, headPortId, tailLocation, headLocation is null.
java.lang.IllegalArgumentException
- if arcId, tailNodeId, headNodeId or name is not valid, or width is bad.public ImmutableArcInst withName(Name name)
name
- node name key.
java.lang.NullPointerException
- if name is null
java.lang.IllegalArgumentException
- if name is not valid.public ImmutableArcInst withNameDescriptor(TextDescriptor nameDescriptor)
nameDescriptor
- TextDescriptor of name
public ImmutableArcInst withLocations(EPoint tailLocation, EPoint headLocation)
tailLocation
- new tail location.headLocation
- new head location.
java.lang.NullPointerException
- if tailLocation is null.public ImmutableArcInst withGridExtendOverMin(long gridExtendOverMin)
gridExtendOverMin
- extend of this arc over minimal arc of this type in grid units.
java.lang.IllegalArgumentException
- if gridExtendOverMin is negative.public ImmutableArcInst withAngle(int angle)
angle
- angle in tenth-degrees.
public ImmutableArcInst withFlags(int flags)
flags
- flag bits of this ImmutableArcInst.
public ImmutableArcInst withFlag(ImmutableArcInst.Flag flag, boolean value)
flag
- Flag selector.value
- new value of flag.
public ImmutableArcInst withVariable(Variable var)
var
- additional Variable.
java.lang.NullPointerException
- if var is nullpublic ImmutableArcInst withoutVariable(Variable.Key key)
key
- Variable Key to remove.
java.lang.NullPointerException
- if key is nullpublic int hashCodeExceptVariables()
hashCodeExceptVariables
in class ImmutableElectricObject
public boolean equalsExceptVariables(ImmutableElectricObject o)
equalsExceptVariables
in class ImmutableElectricObject
o
- other ImmutableElectricObject.
public void makeGridBoxInt(int[] intCoords, boolean tailExtended, boolean headExtended, int gridExtend)
public java.lang.Double getRadius()
public boolean check(TechPool techPool)
public void check()
java.lang.AssertionError
- if invariant is broken.public int getElibBits()
public static int flagsFromElib(int elibBits)
elibBits
- the disk userbits.
public static int angleFromElib(int elibBits)
elibBits
- ELIB user bits.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |