Top Description Fields Constructors Methods
org.jruby.util

public Class RubyTimeOutputFormatter

extends Token
Class Inheritance
Imports
org.jruby.util.RubyDateFormatter.FieldType

Support for GNU-C output formatters, see: http://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html

Field Summary

Modifier and TypeField and Description
public static final RubyTimeOutputFormatter
pack-priv final ByteList
private static final int
private static final int
pack-priv final int
Inherited from org.jruby.util.RubyDateFormatter.Token:
data

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
format(ByteList out, long value, RubyDateFormatter.FieldType type)

public void
format(ByteList out, CharSequence sequence)

pack-priv static void
formatNumber(ByteList out, long value, int width, char padder)

pack-priv static void
formatSignedNumber(ByteList out, long value, long second, int width, char padder)

public char
getPadder(char defaultPadder)

public int
getWidth(int defaultWidth)

pack-priv static int
longSize(long number)

pack-priv static int
longSizeInner(long number)

pack-priv static void
outputLong(ByteList out, int length, long value)

private static void
padding(ByteList out, int len, final int width, final char padder)

public String
toString()

Overrides org.jruby.util.RubyDateFormatter.Token.toString.

Returns a string representation of the object.

Inherited from org.jruby.util.RubyDateFormatter.Token:
formatformattergetDatagetFormatspecialstrzoneOffsetColons

Field Detail

DEFAULT_FORMATTERback to summary
public static final RubyTimeOutputFormatter DEFAULT_FORMATTER
flagsback to summary
pack-priv final ByteList flags
MAX_DIGITSback to summary
private static final int MAX_DIGITS
SMALLBUFback to summary
private static final int SMALLBUF
widthback to summary
pack-priv final int width

Constructor Detail

RubyTimeOutputFormatterback to summary
public RubyTimeOutputFormatter(ByteList flags, int width)

Method Detail

formatback to summary
public void format(ByteList out, long value, RubyDateFormatter.FieldType type)
formatback to summary
public void format(ByteList out, CharSequence sequence)
formatNumberback to summary
pack-priv static void formatNumber(ByteList out, long value, int width, char padder)
formatSignedNumberback to summary
pack-priv static void formatSignedNumber(ByteList out, long value, long second, int width, char padder)
getPadderback to summary
public char getPadder(char defaultPadder)
getWidthback to summary
public int getWidth(int defaultWidth)
longSizeback to summary
pack-priv static int longSize(long number)
longSizeInnerback to summary
pack-priv static int longSizeInner(long number)
outputLongback to summary
pack-priv static void outputLong(ByteList out, int length, long value)
paddingback to summary
private static void padding(ByteList out, int len, final int width, final char padder)
toStringback to summary
public String toString()

Overrides org.jruby.util.RubyDateFormatter.Token.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object