FastStack.isEmpty
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.pentaho.reporting.libraries.base.util.FastStack.isEmpty(Showing top 15 results out of 315)

origin: pentaho/pentaho-reporting

 public int getGroupStartRow( final int group ) {
  if ( group < 0 || group >= groupStarts.size() ) {
   if ( groupStarts.isEmpty() ) {
    return 0;
   }
   final GroupStartRecord o = groupStarts.peek();
   return o.getRow();
  }

  final GroupStartRecord o = groupStarts.get( group );
  return o.getRow();
 }
}
origin: pentaho/pentaho-reporting

 public BoxAlignContext closeContext() {
  final BoxAlignContext context = contexts.pop();
  context.validate();
  if ( contexts.isEmpty() ) {
   currentLine = null;
  } else {
   currentLine = contexts.peek();
  }
  return context;
 }
}
origin: pentaho/pentaho-reporting

 protected void inspectEndSection( final ReportElement box, final boolean inlineSection ) {
  formatBufferStack.pop();
  if ( formatBufferStack.isEmpty() ) {
   return;
  }

  RichTextFormat rtf = formatBufferStack.peek();
  final RichTextFormat lastRtf = formatBuffer.get( formatBuffer.size() - 1 );
  if ( lastRtf.getFont().equals( rtf.getFont() ) == false ) {
   formatBuffer.add( new RichTextFormat( getTextLength(), rtf.getFont() ) );
  }
 }
}
origin: pentaho/pentaho-reporting

protected StyleRule getParentRule() {
 if ( parentRules.isEmpty() == false ) {
  return (StyleRule) parentRules.peek();
 }
 return null;
}
origin: pentaho/pentaho-reporting

/**
 * Receives notification that a row of data is being processed.
 *
 * @param event
 *          the event.
 */
public void itemsAdvanced( final ReportEvent event ) {
 if ( event.getLevel() == getDependencyLevel() ) {
  if ( processingStack == null || processingStack.isEmpty() ) {
   return;
  }
  final CrosstabSpecification state = processingStack.peek();
  if ( state == null ) {
   return;
  }
  // this may throw an InvalidReportStateException that ends the report processing.
  state.add( getDataRow() );
 }
}
origin: pentaho/pentaho-reporting

/**
 * Computes a set of column names starting with the deepest parent up to the member actually found on the axis.
 *
 * @param m
 */
public static void computeDeepColumnNames( Member m,
                      final MemberAddingStrategy memberToNameMapping ) {
 final FastStack<Member> memberStack = new FastStack<Member>();
 while ( m != null ) {
  memberStack.push( m );
  m = m.getParentMember();
 }
 while ( memberStack.isEmpty() == false ) {
  Member mx = memberStack.pop();
  memberToNameMapping.add( mx );
 }
}
origin: pentaho/pentaho-reporting

/**
 * Checks, whether the given namespace prefix is defined.
 *
 * @param prefix the namespace prefix.
 * @return true, if the prefix is defined, false otherwise.
 */
public boolean isNamespacePrefixDefined( final String prefix ) {
 if ( impliedNamespaces != null ) {
  if ( impliedNamespaces.containsValue( prefix ) ) {
   return true;
  }
 }
 if ( openTags.isEmpty() ) {
  return false;
 }
 final ElementLevel parent = (ElementLevel) openTags.peek();
 return parent.getNamespaces().isPrefixDefined( prefix );
}
origin: pentaho/pentaho-reporting

/**
 * Returns all namespaces as properties-collection. This reflects the currently defined namespaces, therefore calls to
 * writeOpenTag(..) might cause this method to return different collections.
 *
 * @return the defined namespaces.
 */
public Properties getNamespaces() {
 final Properties namespaces = new Properties();
 if ( openTags.isEmpty() ) {
  if ( impliedNamespaces != null ) {
   //noinspection UseOfPropertiesAsHashtable
   namespaces.putAll( impliedNamespaces );
  }
  return namespaces;
 }
 final ElementLevel parent = (ElementLevel) openTags.peek();
 //noinspection UseOfPropertiesAsHashtable
 namespaces.putAll( parent.getNamespaces().getNamespaces() );
 return namespaces;
}
origin: pentaho/pentaho-reporting

public void resolveParent( final ReportElement element, final ElementStyleSheet resolverTarget ) {
 if ( designTime == false ) {
  final Section parentSection = element.getParentSection();
  if ( parentSection == null ) {
   return;
  }
  final SimpleStyleSheet computedStyle = parentSection.getComputedStyle();
  resolverTarget.addInherited( computedStyle );
 }
 final FastStack<Section> parentSections = new FastStack<Section>();
 ReportElement e = element;
 while ( e.getParentSection() != null ) {
  final Section section = e.getParentSection();
  parentSections.push( section );
  e = section;
 }
 while ( parentSections.isEmpty() == false ) {
  final Section section = parentSections.pop();
  resolverTarget.addInherited( section.getStyle() );
 }
}
origin: pentaho/pentaho-reporting

/**
 * Hand control back to the previous handler.
 *
 * @param tagName the tagname.
 * @param uri     the namespace uri of the current tag.
 * @throws SAXException if there is a problem with the parser.
 */
public void unwind( final String uri, final String tagName )
 throws SAXException {
 // remove current handler from stack ..
 this.currentHandlers.pop();
 if ( this.currentHandlers.isEmpty() && !this.outerScopes.isEmpty() ) {
  // if empty, but "recurse" had been called, then restore the old handler stack ..
  // but do not end the recursed element ..
  this.currentHandlers = this.outerScopes.pop();
 } else if ( !this.currentHandlers.isEmpty() ) {
  // if there are some handlers open, close them too (these handlers must be delegates)..
  getCurrentHandler().endElement( uri, tagName );
 }
}
origin: pentaho/pentaho-reporting

protected void finishInlineBox( final InlineRenderBox box ) {
 formatBufferStack.pop();
 if ( formatBufferStack.isEmpty() ) {
  return;
 }
 RichTextFormat rtf = formatBufferStack.peek();
 final RichTextFormat lastRtf = formatBuffer.get( formatBuffer.size() - 1 );
 if ( lastRtf.getFont().equals( rtf.getFont() ) == false ) {
  formatBuffer.add( new RichTextFormat( getTextLength(), rtf.getFont() ) );
 }
}
origin: pentaho/pentaho-reporting

/**
 * Clones the expression. The expression should be reinitialized after the cloning.
 * <P>
 * Expressions maintain no state, cloning is done at the beginning of the report processing to disconnect the
 * expression from any other object space.
 *
 * @return a clone of this expression.
 * @throws CloneNotSupportedException
 *           this should never happen.
 */
public Object clone() throws CloneNotSupportedException {
 final CrosstabProcessorFunction cps = (CrosstabProcessorFunction) super.clone();
 if ( processingStack == null || processingStack.isEmpty() ) {
  return cps;
 }
 cps.processingStack = processingStack.clone();
 return cps;
}
origin: pentaho/pentaho-reporting

/**
 * Computes the current collection of defined namespaces.
 *
 * @return the namespaces declared at this writing position.
 */
protected DeclaredNamespaces computeNamespaces() {
 if ( openTags.isEmpty() ) {
  final DeclaredNamespaces namespaces = new DeclaredNamespaces();
  if ( impliedNamespaces != null ) {
   return namespaces.add( impliedNamespaces );
  }
  return namespaces;
 }
 final ElementLevel parent = (ElementLevel) openTags.peek();
 return parent.getNamespaces();
}
origin: pentaho/pentaho-reporting

/**
 * Checks, whether the given URI is defined as valid namespace.
 *
 * @param uri the uri of the namespace.
 * @return true, if there's a namespace defined, false otherwise.
 */
public boolean isNamespaceDefined( final String uri ) {
 if ( impliedNamespaces != null ) {
  if ( impliedNamespaces.containsKey( uri ) ) {
   return true;
  }
 }
 if ( openTags.isEmpty() ) {
  return false;
 }
 final ElementLevel parent = (ElementLevel) openTags.peek();
 return parent.getNamespaces().isNamespaceDefined( uri );
}
origin: pentaho/pentaho-reporting

/**
 * Computes a set of column names starting with the deepest parent up to the member actually found on the axis.
 *
 * @param m
 */
public static void computeDeepColumnNames( Member m,
                      final MemberAddingStrategy memberToNameMapping ) {
 final FastStack<Member> memberStack = new FastStack<Member>();
 while ( m != null ) {
  memberStack.push( m );
  m = m.getParentMember();
 }
 while ( memberStack.isEmpty() == false ) {
  Member mx = memberStack.pop();
  memberToNameMapping.add( mx );
 }
}
org.pentaho.reporting.libraries.base.utilFastStackisEmpty

Javadoc

Checks whether the stack is empty.

Popular methods of FastStack

  • pop
    Loads the top-most element from the stack and removes it from the stack at the same time.
  • push
    Pushes a new object on the stack. Null-references are allowed.
  • peek
    Loads the top-most element from the stack, without removing it from the stack.
  • <init>
    Creates a new stack with an initial size and growth as specified.
  • size
    Returns the number of elements in the stack.
  • clear
    Removes all contents from the stack.
  • get
    Returns the element from the stack at the given index-position.
  • clone
    Creates a shallow copy of the stack.

Popular classes and methods

  • startActivity (Activity)
  • setRequestProperty (URLConnection)
    Sets the value of the specified request header field. The value will only be used by the current URL
  • setContentView (Activity)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JPanel (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)