org.pf.bif.text
Interface IStringPair

All Known Subinterfaces:
IMutableStringPair

public interface IStringPair

Specifies a pair of String objects. Such pairs quite common and deserve to be modeled in a separate interface.

Version:
1.0
Author:
M.Duchrow

Field Summary
static IStringPair[] EMPTY_ARRAY
          An immutable empty array of this type.
 
Method Summary
 String[] asArray()
          Returns both strings of this pair in a String array.
 String asString(String separator)
          Returns the two strings as one string separated by the given separator.
 String getString1()
          Returns the first string of this pair.
 String getString2()
          Returns the second string of this pair.
 

Field Detail

EMPTY_ARRAY

static final IStringPair[] EMPTY_ARRAY
An immutable empty array of this type.

Method Detail

getString1

String getString1()
Returns the first string of this pair.


getString2

String getString2()
Returns the second string of this pair.


asArray

String[] asArray()
Returns both strings of this pair in a String array.


asString

String asString(String separator)
Returns the two strings as one string separated by the given separator. If the provided separator is null, no separator should be put between the strings.

Parameters:
separator - A separator to be placed between the two strings.


Copyright © 2012 Manfred Duchrow Consulting & Software. All Rights Reserved.