001/**
002 * SealedText.java
003 *
004 * Copyright (c) 2004-2012, Nicole C. Tedesco.  All rights reserved.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at:
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package net.sf.jaccumulator.texts;
020
021import net.sf.jaccumulator.Domain;
022
023/**
024 * Read behavior for any representation of {@link Domain#TEXT text}
025 *
026 * @param <TEXT>
027 *        the type of text to produce from the {@link #copy()} function
028 * @since JAccumulator 4.0
029 * @author Nicole Tedesco (<a
030 *         href="mailto:Nicole@NicoleTedesco.com">Nicole@NicoleTedesco.com</a>)
031 */
032public interface SealedText<TEXT extends SealedText<TEXT>>
033    extends
034        TextReplicator<TEXT>,
035        SealedTextValue
036{
037    /**
038     * Compares this object's {@link String text} equivalent with the specified
039     * text for order
040     *
041     * @param text
042     *        text to compare against
043     * @return a negative integer, zero, or a positive integer if this object's
044     *         text equivalent is less than, equal to, or greater than the
045     *         specified text.
046     * @see Comparable#compareTo(Object)
047     */
048    public int compareToText( final CharSequence text );
049
050    public boolean isEqualToText( final CharSequence aValue );
051    public boolean isGreaterThanText( final CharSequence aValue );
052    public boolean isGreaterOrEqualToText( final CharSequence aValue );
053    public boolean isLessThanText( final CharSequence aValue );
054    public boolean isLessOrEqualToText( final CharSequence aValue );
055    public boolean isNotEqualToText( final CharSequence aValue );
056}