Home | History | Annotate | Download | only in text
      1 /* GENERATED SOURCE. DO NOT MODIFY. */
      2 //  2016 and later: Unicode, Inc. and others.
      3 // License & terms of use: http://www.unicode.org/copyright.html#License
      4 /*
      5  *******************************************************************************
      6  * Copyright (C) 1996-2010, International Business Machines Corporation and    *
      7  * others. All Rights Reserved.                                                *
      8  *******************************************************************************
      9  */
     10 package android.icu.text;
     11 
     12 /**
     13  * A transliterator that leaves text unchanged.
     14  */
     15 class NullTransliterator extends Transliterator {
     16     /**
     17      * Package accessible IDs for this transliterator.
     18      */
     19     static final String SHORT_ID = "Null";
     20     static final String _ID      = "Any-Null";
     21 
     22     /**
     23      * Constructs a transliterator.
     24      */
     25     public NullTransliterator() {
     26         super(_ID, null);
     27     }
     28 
     29     /**
     30      * Implements {@link Transliterator#handleTransliterate}.
     31      */
     32     @Override
     33     protected void handleTransliterate(Replaceable text,
     34                                        Position offsets, boolean incremental) {
     35         offsets.start = offsets.limit;
     36     }
     37 
     38     /* (non-Javadoc)
     39      * @see android.icu.text.Transliterator#addSourceTargetSet(boolean, android.icu.text.UnicodeSet, android.icu.text.UnicodeSet)
     40      */
     41     @Override
     42     public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
     43         // do nothing
     44     }
     45 }
     46