Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   *  Copyright 2001-2005 Stephen Colebourne
   *
   *  Licensed under the Apache License, Version 2.0 (the "License");
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
  *  Unless required by applicable law or agreed to in writing, software
  *  distributed under the License is distributed on an "AS IS" BASIS,
  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
 package org.joda.time.chrono;
 
 
Provides time calculations for the coptic era component of time.

Author(s):
Brian S O'Neill
Stephen Colebourne
Since:
1.2, refactored from CopticEraDateTimeField
 
 final class BasicSingleEraDateTimeField extends BaseDateTimeField {

    
Value of the era, which will be the same as DateTimeConstants.CE.
 
     private static final int ERA_VALUE = .;
    
Text value of the era.
 
     private final String iEraText;

    
Restricted constructor.
 
         super(DateTimeFieldType.era());
          = text;
     }

    

InheritDoc:
 
     public boolean isLenient() {
         return false;
     }

    

InheritDoc:
 
     public int get(long instant) {
         return ;
     }

    

InheritDoc:
 
     public long set(long instantint era) {
         FieldUtils.verifyValueBounds(thisera);
         return instant;
     }

    

InheritDoc:
 
     public long set(long instantString textLocale locale) {
         if (.equals(text) == false && "1".equals(text) == false) {
             throw new IllegalFieldValueException(DateTimeFieldType.era(), text);
         }
         return instant;
     }

    

InheritDoc:
 
     public long roundFloor(long instant) {
         return .;
     }

    

InheritDoc:
 
     public long roundCeiling(long instant) {
         return .;
     }

    

InheritDoc:
 
     public long roundHalfFloor(long instant) {
         return .;
     }

    

InheritDoc:
 
     public long roundHalfCeiling(long instant) {
         return .;
     }

    

InheritDoc:
 
    public long roundHalfEven(long instant) {
        return .;
    }

    

InheritDoc:
    public DurationField getDurationField() {
        return UnsupportedDurationField.getInstance(DurationFieldType.eras());
    }

    

InheritDoc:
        return null;
    }

    

InheritDoc:
    public int getMinimumValue() {
        return ;
    }

    

InheritDoc:
    public int getMaximumValue() {
        return ;
    }

    

InheritDoc:
    public String getAsText(int fieldValueLocale locale) {
        return ;
    }

    

InheritDoc:
    public int getMaximumTextLength(Locale locale) {
        return .length();
    }
New to GrepCode? Check out our FAQ X