test_class.declarator: factory = new ValueFactoryImpl()
test_class.modifier: private static final
test_class.original_string: private static final ValueFactory factory = new ValueFactoryImpl();
test_class.type: ValueFactory
test_class.var_name: factory
test_class.declarator: display = new MarketDisplayBaseImpl()
test_class.modifier: public static
test_class.original_string: public static MarketDisplay display = new MarketDisplayBaseImpl();
test_class.type: MarketDisplay
test_class.var_name: display
test_class.declarator: BIN_Z00 = factory.newFraction(2, 0)
test_class.modifier: public static
test_class.original_string: public static Fraction BIN_Z00 = factory.newFraction(2, 0);
test_class.type: Fraction
test_class.var_name: BIN_Z00
test_class.declarator: BIN_N01 = factory.newFraction(2, -1)
test_class.modifier: public static
test_class.original_string: public static Fraction BIN_N01 = factory.newFraction(2, -1);
test_class.type: Fraction
test_class.var_name: BIN_N01
test_class.declarator: BIN_N02 = factory.newFraction(2, -2)
test_class.modifier: public static
test_class.original_string: public static Fraction BIN_N02 = factory.newFraction(2, -2);
test_class.type: Fraction
test_class.var_name: BIN_N02
test_class.declarator: BIN_N03 = factory.newFraction(2, -3)
test_class.modifier: public static
test_class.original_string: public static Fraction BIN_N03 = factory.newFraction(2, -3);
test_class.type: Fraction
test_class.var_name: BIN_N03
test_class.declarator: BIN_N04 = factory.newFraction(2, -4)
test_class.modifier: public static
test_class.original_string: public static Fraction BIN_N04 = factory.newFraction(2, -4);
test_class.type: Fraction
test_class.var_name: BIN_N04
test_class.declarator: BIN_N07 = factory.newFraction(2, -7)
test_class.modifier: public static
test_class.original_string: public static Fraction BIN_N07 = factory.newFraction(2, -7);
test_class.type: Fraction
test_class.var_name: BIN_N07
test_class.declarator: DEC_Z00 = factory.newFraction(10, 0)
test_class.modifier: public static
test_class.original_string: public static Fraction DEC_Z00 = factory.newFraction(10, 0);
test_class.type: Fraction
test_class.var_name: DEC_Z00
test_class.declarator: DEC_N01 = factory.newFraction(10, -1)
test_class.modifier: public static
test_class.original_string: public static Fraction DEC_N01 = factory.newFraction(10, -1);
test_class.type: Fraction
test_class.var_name: DEC_N01
test_class.declarator: DEC_N02 = factory.newFraction(10, -2)
test_class.modifier: public static
test_class.original_string: public static Fraction DEC_N02 = factory.newFraction(10, -2);
test_class.type: Fraction
test_class.var_name: DEC_N02
test_class.declarator: DEC_N03 = factory.newFraction(10, -3)
test_class.modifier: public static
test_class.original_string: public static Fraction DEC_N03 = factory.newFraction(10, -3);
test_class.type: Fraction
test_class.var_name: DEC_N03
test_class.declarator: DEC_N04 = factory.newFraction(10, -4)
test_class.modifier: public static
test_class.original_string: public static Fraction DEC_N04 = factory.newFraction(10, -4);
test_class.type: Fraction
test_class.var_name: DEC_N04
test_class.declarator: DEC_N05 = factory.newFraction(10, -5)
test_class.modifier: public static
test_class.original_string: public static Fraction DEC_N05 = factory.newFraction(10, -5);
test_class.type: Fraction
test_class.var_name: DEC_N05
test_class.declarator: DEC_N06 = factory.newFraction(10, -6)
test_class.modifier: public static
test_class.original_string: public static Fraction DEC_N06 = factory.newFraction(10, -6);
test_class.type: Fraction
test_class.var_name: DEC_N06
test_class.declarator: DEC_N07 = factory.newFraction(10, -7)
test_class.modifier: public static
test_class.original_string: public static Fraction DEC_N07 = factory.newFraction(10, -7);
test_class.type: Fraction
test_class.var_name: DEC_N07
test_class.file: base/src/test/java/com/barchart/feed/base/provider/TestMarketDisplayBaseImpl.java
test_class.identifier: TestMarketDisplayBaseImpl
test_case.body: @Test
  	public void testPriceText() {
  		
  		PriceValue price;
  		String text;
  		
  		//
  		price = newPrice(181925, -2);
  		text = display.priceText(price, DEC_N02);
  		System.out.println("price : " + text);
  		assertEquals("1819.25", text);
  
  		//
  		price = newPrice(181900, -2);
  		text = display.priceText(price, DEC_N02);
  		System.out.println("price : " + text);
  		assertEquals("1819.00", text);
  
  		// 1819 1/4
  		price = newPrice(181925, -2);
  		text = display.priceText(price, BIN_N02);
  		System.out.println("price : " + text);
  		assertEquals("1819-1", text);
  
  		// 1819 3/4
  		price = newPrice(181975, -2);
  		text = display.priceText(price, BIN_N02);
  		System.out.println("price : " + text);
  		assertEquals("1819-3", text);
  
  		// 1819 1/8
  		price = newPrice(1819125, -3);
  		text = display.priceText(price, BIN_N03);
  		System.out.println("price : " + text);
  		assertEquals("1819-1", text);
  
  		// 1819 2/8
  		price = newPrice(1819250, -3);
  		text = display.priceText(price, BIN_N03);
  		System.out.println("price : " + text);
  		assertEquals("1819-2", text);
  
  		// 1819 2/16
  		price = newPrice(18191250, -4);
  		text = display.priceText(price, BIN_N04);
  		System.out.println("price : " + text);
  		assertEquals("1819-02", text);
  
  		// 2 3/128
  		price = newPrice(20234375, -7);
  		text = display.priceText(price, BIN_N07);
  		System.out.println("price : " + text);
  		assertEquals("2-003", text);
  
  		price = newPrice(181925, -3);
  		text = display.priceText(price, DEC_N04);
  		System.out.println("price : " + text);
  		assertEquals("181.9250", text);
  
  		price = newPrice(181925, -2);
  		text = display.priceText(price, DEC_N04);
  		System.out.println("price : " + text);
  		assertEquals("1819.2500", text);
  
  		price = newPrice(1819, 0);
  		text = display.priceText(price, DEC_N03);
  		System.out.println("price : " + text);
  		assertEquals("1819.000", text);
  
  		price = newPrice(-1819, 0);
  		text = display.priceText(price, DEC_N03);
  		System.out.println("price : " + text);
  		assertEquals("-1819.000", text);
  
  		price = newPrice(18195, -1);
  		text = display.priceText(price, DEC_N02);
  		System.out.println("price : " + text);
  		assertEquals("1819.50", text);
  
  		price = newPrice(-1, 0);
  		text = display.priceText(price, DEC_Z00);
  		System.out.println("price : " + text);
  		assertEquals("-1", text);
  
  		price = newPrice(-1, 0);
  		text = display.priceText(price, DEC_N02);
  		System.out.println("price : " + text);
  		assertEquals("-1.00", text);
  
  		price = newPrice(-125, -2);
  		text = display.priceText(price, DEC_N02);
  		System.out.println("price : " + text);
  		assertEquals("-1.25", text);
  
  		// 1 3/4
  		price = newPrice(175, -2);
  		text = display.priceText(price, BIN_N02);
  		System.out.println("price : " + text);
  		assertEquals("1-3", text);
  
  		// -1 3/4
  		price = newPrice(-175, -2);
  		text = display.priceText(price, BIN_N02);
  		System.out.println("price : " + text);
  		assertEquals("-1-3", text);
  		
  	}
test_case.class_method_signature: TestMarketDisplayBaseImpl.testPriceText()
test_case.full_signature: @Test public void testPriceText()
test_case.identifier: testPriceText
test_case.invocations: newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals newPrice priceText println assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPriceText()
focal_class.declarator: YEAR_FULL = DateTimeFormat
  			.forPattern("yyyy")
focal_class.modifier: private final static
focal_class.original_string: private final static DateTimeFormatter YEAR_FULL = DateTimeFormat
  			.forPattern("yyyy");
focal_class.type: DateTimeFormatter
focal_class.var_name: YEAR_FULL
focal_class.declarator: YEAR_SHORT = DateTimeFormat
  			.forPattern("yy")
focal_class.modifier: private final static
focal_class.original_string: private final static DateTimeFormatter YEAR_SHORT = DateTimeFormat
  			.forPattern("yy");
focal_class.type: DateTimeFormatter
focal_class.var_name: YEAR_SHORT
focal_class.declarator: MONTH_FULL = DateTimeFormat
  			.forPattern("MMMMMMMMMMMM")
focal_class.modifier: private final static
focal_class.original_string: private final static DateTimeFormatter MONTH_FULL = DateTimeFormat
  			.forPattern("MMMMMMMMMMMM");
focal_class.type: DateTimeFormatter
focal_class.var_name: MONTH_FULL
focal_class.declarator: MONTH_SHORT = DateTimeFormat
  			.forPattern("MMM")
focal_class.modifier: private final static
focal_class.original_string: private final static DateTimeFormatter MONTH_SHORT = DateTimeFormat
  			.forPattern("MMM");
focal_class.type: DateTimeFormatter
focal_class.var_name: MONTH_SHORT
focal_class.declarator: TIME_SHORT = DateTimeFormat
  			.forPattern("HH:mm:ss")
focal_class.modifier: private final static
focal_class.original_string: private final static DateTimeFormatter TIME_SHORT = DateTimeFormat
  			.forPattern("HH:mm:ss");
focal_class.type: DateTimeFormatter
focal_class.var_name: TIME_SHORT
focal_class.declarator: DATE_SHORT = DateTimeFormat
  			.forPattern("MM/dd/yyyy")
focal_class.modifier: private final static
focal_class.original_string: private final static DateTimeFormatter DATE_SHORT = DateTimeFormat
  			.forPattern("MM/dd/yyyy");
focal_class.type: DateTimeFormatter
focal_class.var_name: DATE_SHORT
focal_class.declarator: TIME_WITH_DATE = DateTimeFormat
  			.forPattern("MM/dd/yyyy HH:mm:ss")
focal_class.modifier: private final static
focal_class.original_string: private final static DateTimeFormatter TIME_WITH_DATE = DateTimeFormat
  			.forPattern("MM/dd/yyyy HH:mm:ss");
focal_class.type: DateTimeFormatter
focal_class.var_name: TIME_WITH_DATE
focal_class.file: base/src/main/java/com/barchart/feed/base/provider/MarketDisplayBaseImpl.java
focal_class.identifier: MarketDisplayBaseImpl
focal_class.interfaces: implements MarketDisplay
focal_class.class_method_signature: MarketDisplayBaseImpl.filter(final TimeValue time)
focal_class.full_signature: private static TimeValue filter(final TimeValue time)
focal_class.identifier: filter
focal_class.modifiers: private static
focal_class.parameters: (final TimeValue time)
focal_class.return: TimeValue
focal_class.signature: TimeValue filter(final TimeValue time)
focal_class.class_method_signature: MarketDisplayBaseImpl.timeYearFull(TimeValue time)
focal_class.full_signature: @Override public String timeYearFull(TimeValue time)
focal_class.identifier: timeYearFull
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue time)
focal_class.return: String
focal_class.signature: String timeYearFull(TimeValue time)
focal_class.class_method_signature: MarketDisplayBaseImpl.timeYearShort(TimeValue time)
focal_class.full_signature: @Override public String timeYearShort(TimeValue time)
focal_class.identifier: timeYearShort
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue time)
focal_class.return: String
focal_class.signature: String timeYearShort(TimeValue time)
focal_class.class_method_signature: MarketDisplayBaseImpl.timeMonthFull(TimeValue time)
focal_class.full_signature: @Override public String timeMonthFull(TimeValue time)
focal_class.identifier: timeMonthFull
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue time)
focal_class.return: String
focal_class.signature: String timeMonthFull(TimeValue time)
focal_class.class_method_signature: MarketDisplayBaseImpl.timeMonthShort(TimeValue time)
focal_class.full_signature: @Override public String timeMonthShort(TimeValue time)
focal_class.identifier: timeMonthShort
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue time)
focal_class.return: String
focal_class.signature: String timeMonthShort(TimeValue time)
focal_class.class_method_signature: MarketDisplayBaseImpl.timeMonthCode(TimeValue time)
focal_class.full_signature: @Override public String timeMonthCode(TimeValue time)
focal_class.identifier: timeMonthCode
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue time)
focal_class.return: String
focal_class.signature: String timeMonthCode(TimeValue time)
focal_class.class_method_signature: MarketDisplayBaseImpl.priceFractionText(PriceValue price, Fraction frac)
focal_class.full_signature: @Override public String priceFractionText(PriceValue price, Fraction frac)
focal_class.identifier: priceFractionText
focal_class.modifiers: @Override public
focal_class.parameters: (PriceValue price, Fraction frac)
focal_class.return: String
focal_class.signature: String priceFractionText(PriceValue price, Fraction frac)
focal_class.class_method_signature: MarketDisplayBaseImpl.priceText(PriceValue price, Fraction frac)
focal_class.full_signature: @Override public String priceText(PriceValue price, Fraction frac)
focal_class.identifier: priceText
focal_class.modifiers: @Override public
focal_class.parameters: (PriceValue price, Fraction frac)
focal_class.return: String
focal_class.signature: String priceText(PriceValue price, Fraction frac)
focal_class.class_method_signature: MarketDisplayBaseImpl.priceText(PriceValue price, long base, long exponent)
focal_class.full_signature: @Override public String priceText(PriceValue price, long base, long exponent)
focal_class.identifier: priceText
focal_class.modifiers: @Override public
focal_class.parameters: (PriceValue price, long base, long exponent)
focal_class.return: String
focal_class.signature: String priceText(PriceValue price, long base, long exponent)
focal_class.class_method_signature: MarketDisplayBaseImpl.priceText(long mantissa, int exponent, long base, long baseExp)
focal_class.full_signature: @Override public String priceText(long mantissa, int exponent, long base, long baseExp)
focal_class.identifier: priceText
focal_class.modifiers: @Override public
focal_class.parameters: (long mantissa, int exponent, long base, long baseExp)
focal_class.return: String
focal_class.signature: String priceText(long mantissa, int exponent, long base, long baseExp)
focal_class.class_method_signature: MarketDisplayBaseImpl.sizeText(SizeValue size)
focal_class.full_signature: @Override public String sizeText(SizeValue size)
focal_class.identifier: sizeText
focal_class.modifiers: @Override public
focal_class.parameters: (SizeValue size)
focal_class.return: String
focal_class.signature: String sizeText(SizeValue size)
focal_class.class_method_signature: MarketDisplayBaseImpl.sizeText(long size)
focal_class.full_signature: @Override public String sizeText(long size)
focal_class.identifier: sizeText
focal_class.modifiers: @Override public
focal_class.parameters: (long size)
focal_class.return: String
focal_class.signature: String sizeText(long size)
focal_class.class_method_signature: MarketDisplayBaseImpl.timeTextISO(TimeValue value)
focal_class.full_signature: @Override public String timeTextISO(TimeValue value)
focal_class.identifier: timeTextISO
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue value)
focal_class.return: String
focal_class.signature: String timeTextISO(TimeValue value)
focal_class.class_method_signature: MarketDisplayBaseImpl.timeTextShort(TimeValue value)
focal_class.full_signature: @Override public String timeTextShort(TimeValue value)
focal_class.identifier: timeTextShort
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue value)
focal_class.return: String
focal_class.signature: String timeTextShort(TimeValue value)
focal_class.class_method_signature: MarketDisplayBaseImpl.dateTimeText(TimeValue value)
focal_class.full_signature: @Override public String dateTimeText(TimeValue value)
focal_class.identifier: dateTimeText
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue value)
focal_class.return: String
focal_class.signature: String dateTimeText(TimeValue value)
focal_class.class_method_signature: MarketDisplayBaseImpl.dateTextShort(TimeValue value)
focal_class.full_signature: @Override public String dateTextShort(TimeValue value)
focal_class.identifier: dateTextShort
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue value)
focal_class.return: String
focal_class.signature: String dateTextShort(TimeValue value)
focal_class.class_method_signature: MarketDisplayBaseImpl.timeTextShort(TimeValue value, DateTimeZone zone)
focal_class.full_signature: @Override public String timeTextShort(TimeValue value, DateTimeZone zone)
focal_class.identifier: timeTextShort
focal_class.modifiers: @Override public
focal_class.parameters: (TimeValue value, DateTimeZone zone)
focal_class.return: String
focal_class.signature: String timeTextShort(TimeValue value, DateTimeZone zone)
focal_method.body: @Override
  	public String priceText(PriceValue price, Fraction frac) {
  		if(price == null) {
  			price = ValueConst.NULL_PRICE;
  		}
  		if(frac == null) {
  			//TODO
  		}
  		
  		long mantissa = price.mantissa();
  		int exponent = price.exponent();
  		boolean isMinus;
  		
  		if (mantissa < 0) {
  			mantissa = -mantissa;
  			isMinus = true;
  		} else {
  			isMinus = false;
  		}
  		
  		final long scale = frac.exponent();
  
  		while (exponent > scale) {
  			mantissa *= 10;
  			exponent--;
  		}
  
  		while (exponent < scale) {
  			mantissa /= 10;
  			exponent++;
  		}
  		
  		long whole = frac.priceWhole(mantissa, exponent);
  		
  		final char separator;
  		if(frac.base() == 10) {
  			mantissa %= frac.denominator();
  			separator = ASCII.DOT;
  		} else {
  			mantissa %= frac.decimalDenominator();
  			mantissa *= frac.denominator();
  			mantissa /= frac.decimalDenominator();
  			separator = ASCII.DASH;			
  		} 
  		
  		long part = mantissa;
  		
  		final int size = 64;
  
  		final char[] array = new char[size];
  
  		int index = size - 1;
  
  		long places = frac.places();
  		if(frac.base() == 10) {
  			places--;
  		}
  
  		/* part */if (places > 0) {
  
  			for (int k = 0; k < places; k++) {
  				final char alpha = (char) (part % 10 + ASCII._0_);
  				array[index--] = alpha;
  				part /= 10;
  			}
  
  			array[index--] = separator;
  
  		}
  
  		/* whole */if (whole == 0) {
  			array[index--] = ASCII._0_;
  		} else {
  
  			while (whole != 0) {
  				final char alpha = (char) (whole % 10 + ASCII._0_);
  				array[index--] = alpha;
  				whole /= 10;
  			}
  
  			if (isMinus) {
  				array[index--] = ASCII.MINUS;
  			}
  
  		}
  
  		final int offset = index + 1;
  
  		final int length = size - offset;
  
  		return new String(array, offset, length);
  	}
focal_method.class_method_signature: MarketDisplayBaseImpl.priceText(PriceValue price, Fraction frac)
focal_method.full_signature: @Override public String priceText(PriceValue price, Fraction frac)
focal_method.identifier: priceText
focal_method.invocations: mantissa exponent exponent priceWhole base denominator decimalDenominator denominator decimalDenominator places base
focal_method.modifiers: @Override public
focal_method.parameters: (PriceValue price, Fraction frac)
focal_method.return: String
focal_method.signature: String priceText(PriceValue price, Fraction frac)