com.starteam
Class File.EOLFormat

java.lang.Object
  extended by com.starteam.EnumeratedValue
      extended by com.starteam.File.EOLFormat
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
File

public static final class File.EOLFormat
extends EnumeratedValue

The EOL format of a text file on disk.

See Also:
File.getEOLFormat(), Serialized Form

Field Summary
static File.EOLFormat[] ALL
          All legal EOL format values.
static File.EOLFormat CLIENT_DEFINED
          The EOL format of the working file on disk is determined by the client.
static File.EOLFormat FIXED_CR
          The working file on disk always uses a carriage return to denote end-of-line.
static File.EOLFormat FIXED_CRLF
          The working file on disk always uses a carriage return / line feed sequence to denote end-of-line.
static File.EOLFormat FIXED_LF
          The working file on disk always uses a line feed to denote end-of-line.
static File.EOLFormat PLATFORM
          The native EOLFormat for this platform; one of FIXED_CRLF, FIXED_LF or FIXED_CR.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares this EOLFormat with the Object o
static File.EOLFormat fromEOL(java.lang.String eol)
          Determines the EOLFormat whose end-of-line character sequence matches the given one.
static File.EOLFormat fromEOLFormatID(int id)
          Determines the EOLFormat whose end-of-line character sequence matches the given LineReader EOL ID.
static File.EOLFormat fromID(int id)
          Gets the EOLFormat value corresponding to the given ID.
static File.EOLFormat fromValue(EnumeratedValue value)
          Gets the EOLFormat value corresponding to the given EnumeratedValue.
 int getCode()
          Return the enum code for this object.
 java.lang.String getDisplayName()
          Returns the display name of the EOLFormat.
 java.lang.String getEOL()
          Gets the actual end-of-line character sequence for this EOLFormat.
 int getID()
          The ID of the corresponding EnumeratedValue, as defined in EOLFormatProperty.
 Platform.EOL getPlatformEOL()
          An end of line sequence associated with this EOL format, as used in LineReader.
 int hashCode()
          Returns a hashCode for this EOLFormat instance
 boolean isFixed()
          Returns true if this is one of the fixed EOL formats; false for CLIENT_DEFINED.
 File.EOLFormat toPropertyValue()
          Gets the EOLFormat used as the default value of the FILE_EOL_CHARACTER property for files whose actual EOLFormat is this one.
 java.lang.String toString()
          Returns the name of this EOL instance
 
Methods inherited from class com.starteam.EnumeratedValue
addChild, assignParent, copy, disable, enable, findChild, getChildValues, getDebugString, getDepthInHierarchy, getDisplayNameTranslations, getInternalName, getParentValue, getSortOrder, hasChildValues, isClosedState, isDisabled, isEnabled, isEqualTo, isLeafValue, isRootValue, isSelectable, setAfter, setChildValues, setClosedState, setDisplayName, setDisplayNameTranslations, setEnabled, setInternalName, setSelectable, setSortOrder
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLIENT_DEFINED

public static final File.EOLFormat CLIENT_DEFINED
The EOL format of the working file on disk is determined by the client.


FIXED_CR

public static final File.EOLFormat FIXED_CR
The working file on disk always uses a carriage return to denote end-of-line.


FIXED_CRLF

public static final File.EOLFormat FIXED_CRLF
The working file on disk always uses a carriage return / line feed sequence to denote end-of-line.


FIXED_LF

public static final File.EOLFormat FIXED_LF
The working file on disk always uses a line feed to denote end-of-line.


PLATFORM

public static final File.EOLFormat PLATFORM
The native EOLFormat for this platform; one of FIXED_CRLF, FIXED_LF or FIXED_CR.


ALL

public static final File.EOLFormat[] ALL
All legal EOL format values.

Method Detail

getCode

public int getCode()
Return the enum code for this object.

Overrides:
getCode in class EnumeratedValue
Returns:
the enum code for this object.

getID

public int getID()
The ID of the corresponding EnumeratedValue, as defined in EOLFormatProperty.

Returns:
The ID of this EOL format.
See Also:
File.Type.EOLFormatProperty

getEOL

public java.lang.String getEOL()
Gets the actual end-of-line character sequence for this EOLFormat. For CLIENT_DEFINED, returns the default platform end-of-line sequence.

Returns:
String

getDisplayName

public java.lang.String getDisplayName()
Returns the display name of the EOLFormat.

Overrides:
getDisplayName in class EnumeratedValue
Returns:
the display name of this EOLFormat

getPlatformEOL

public Platform.EOL getPlatformEOL()
An end of line sequence associated with this EOL format, as used in LineReader.

Returns:
Platform#EOL
See Also:
Platform.EOL.CR, Platform.EOL.CRLF, Platform.EOL.LF

isFixed

public boolean isFixed()
Returns true if this is one of the fixed EOL formats; false for CLIENT_DEFINED.

Returns:
boolean

fromValue

public static File.EOLFormat fromValue(EnumeratedValue value)
Gets the EOLFormat value corresponding to the given EnumeratedValue.

Parameters:
value - One of the EnumeratedValues of an EOLFormatProperty.
Returns:
The corresponding EOLFormat value, or null.

fromID

public static File.EOLFormat fromID(int id)
Gets the EOLFormat value corresponding to the given ID.

Parameters:
id - The ID of an EOLFormat.
Returns:
The corresponding EOLFormat value, or null.

fromEOL

public static File.EOLFormat fromEOL(java.lang.String eol)
Determines the EOLFormat whose end-of-line character sequence matches the given one. Considers only the fixed EOLFormat; that is, fromEOL() never returns CLIENT_DEFAULT. Returns null if the given eol doesn't match any of the known EOLFormats.

Parameters:
eol - String
Returns:
EOLFormat
See Also:
File.EOLFormat.getEOL()

fromEOLFormatID

public static File.EOLFormat fromEOLFormatID(int id)
Determines the EOLFormat whose end-of-line character sequence matches the given LineReader EOL ID. Considers only the fixed EOLFormat; that is, fromEOL() never returns CLIENT_DEFAULT. Returns null if the given eol doesn't match any of the known EOLFormats.

Parameters:
id - int
Returns:
EOLFormat
See Also:
File.getEOLFormat()

toPropertyValue

public File.EOLFormat toPropertyValue()
Gets the EOLFormat used as the default value of the FILE_EOL_CHARACTER property for files whose actual EOLFormat is this one.

Returns CLIENT_DEFINED if this EOLFormat matches the PLATFORM EOLFormat; otherwise, returns this EOLFormat itself.

Returns:
EOLFormat

equals

public boolean equals(java.lang.Object o)
Compares this EOLFormat with the Object o

Overrides:
equals in class EnumeratedValue
Parameters:
o - the Object to be compared for equality
Returns:
true if the two objects are identical

hashCode

public int hashCode()
Returns a hashCode for this EOLFormat instance

Overrides:
hashCode in class EnumeratedValue
Returns:
a hashCode for this EOLFormat instance

toString

public java.lang.String toString()
Returns the name of this EOL instance

Overrides:
toString in class EnumeratedValue
Returns:
the name of this EOL instance


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.