/* XBN Java: Generically useful, non-GUI Java code. http://sourceforge.net/projects/xbnjava Copyright (C) 1997-2003, Jeff Epstein All rights reserved. Modifications: No Redistribution in binary form, with or without modifications, are permitted provided that the following conditions are met: * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * If modifications are made to source code then this license should indicate that fact in the "Modifications" section above. * Neither the author, nor the contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [NOTE: This license contains NO advertising clause.] */ package xbn.string; import xbn.XBNObject; /**
Configuration regarding TrimChars.trimAllLines. See TrimChars.trimAllLines. This object is provided directly to the TrimChars constructor
Source code: TALConfig.java
Create a TALConfig with default settings.
**/ public TALConfig() { this(sLINE_SEP); } /**Create a TALConfig.
Equal to TALConfig(s_lineSep, true, true)
Create a TALConfig.
Equal to TALConfig(sLINE_SEP, b_trimLeft, b_trimRight)
Create a TALConfig.
@param s_lineSep Defines the line separator. May not be null or zero characters in length, and may not contain any characters existing inac_toTrim
(as provided to the TrimChars constructor.
@param b_trimLeft When true, then the left side of each line should be trimmed. If false, the the left side is left alone. See doTrimLeft.
@param b_trimRight When true, then the right side of each line should be trimmed. If false, the the right side is left alone. See doTrimRight.
**/
public TALConfig(String s_lineSep, boolean b_trimLeft, boolean b_trimRight) {
throwAXIfBadStr(s_lineSep, "s_lineSep", sCNSTR);
sLineSep = s_lineSep;
bTrimLeft = b_trimLeft;
bTrimRight = b_trimRight;
}
/**
Get the line separator.
@return s_lineSep Exactly as provided to the constructor. **/ public final String getLineSeparator() { return sLineSep; } /**Should characters be trimmed off the left side of each line?
@return b_trimLeft Exactly as provided to the constructor. **/ public final boolean doTrimLeft() { return bTrimLeft; } /**Should characters be trimmed off the right side of each line?
@return b_trimRight Exactly as provided to the constructor. **/ public final boolean doTrimRight() { return bTrimRight; } }