Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text
Class TypedPosition


java.lang.Object
  extended by 

org.eclipse.jface.text.Position
      extended by 
org.eclipse.jface.text.TypedPosition

public class TypedPosition
extends Position

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 content type of the region.
 int hashCode ()
           
  String toString ()
           
 
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, wait, wait, wait
 

Constructor Detail

TypedPosition

public TypedPosition(int offset,
                     int length,
                     
String type)
Creates a position along the given specification.

Parameters:
offset - the offset of this position
length - the length of this position
type - the content type of this position

TypedPosition

public TypedPosition(
ITypedRegion region)
Creates a position based on the typed region.

Parameters:
region - the typed region
Method Detail

getType

public 
String getType()
Returns the content type of the region.

Returns:
the content type of the region

equals

public boolean equals(
Object o)
Overrides:
equals in class Position

hashCode

public int hashCode()
Overrides:
hashCode in class Position

toString

public 
String toString()
Overrides:
toString in class Position

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire