|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.Position
org.eclipse.jface.text.TypedPosition
Convenience class for positions that have a type, similar to
ITypedRegion
.
As Position
,TypedPosition
can
not be used as key in hash tables as it overrides equals
and
hashCode
as it would be a value object.
Field Summary |
Fields inherited from class org.eclipse.jface.text.Position |
isDeleted, length, offset |
Constructor Summary | |
TypedPosition(int offset,
int length,
String type)
Creates a position along the given specification. |
|
TypedPosition(ITypedRegion region)
Creates a position based on the typed region. |
Method Summary | |
boolean |
equals(Object o)
|
String |
getType()
Returns the type of the position |
int |
hashCode()
|
Methods inherited from class org.eclipse.jface.text.Position |
delete, getLength, getOffset, includes, isDeleted, overlapsWith, setLength, setOffset, undelete |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TypedPosition(int offset, int length, String type)
offset
- the offset of this positionlength
- the length of this positiontype
- the type of this positionpublic TypedPosition(ITypedRegion region)
region
- the typed regionMethod Detail |
public String getType()
public boolean equals(Object o)
equals
in class Position
public int hashCode()
hashCode
in class Position
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.